AMU 2026 — Computer PYQ
AMU | Computer | 2026the pwd command in Linux, is used for:
Choose the correct answer:
- A.
to find out the previous directory you were working in
- B.
to find out the directory in which presently you are working in
(Correct Answer) - C.
to find out the parent directory or present subdirectory
- D.
to set the new password
to find out the directory in which presently you are working in
Explanation
1. What does pwd stand for?
In Linux and Unix-like operating systems, pwd stands for Print Working Directory.
pwd≡Print Working Directory
2. Explanation of the Command
When working inside a command-line interface (terminal), you navigate through a hierarchical tree structure of folders (directories). The terminal session always points to a specific directory at any given moment, known as the current working directory or present working directory.
Executing the
pwdcommand outputs the absolute path (starting from the root directory/) of the directory you are currently inside.For example, if you are currently working in the documents folder of a user named "admin", typing
pwdwill output:Output Example: /home/admin/documents
3. Analysis of Options
(b) to find out the directory in which presently you are working in: This completely matches the fundamental definition of Print Working Directory.
(a) to find out the previous directory...: This is incorrect. To return to or reference the previous working directory, you would use environmental shortcuts like
cd -.(c) to find out the parent directory...: This is incorrect. The parent directory is represented by a double dot symbol
...(d) to set the new password: This is a trick choice because of the letter composition. The actual command used to update user authentication credentials in Linux is
passwd.
Correct Answer
The correct option is (b) to find out the directory in which presently you are working in.
