Which Linux command is used to display the current working directory?
2025
Which Linux command is used to display the current working directory?
- A.
dir
- B.
cd
- C.
pwd
- D.
ls -l
- E.
whoami
Attempted by 10 students.
Show answer & explanation
Correct answer: C
Answer: pwd. The pwd command prints the absolute pathname of the current working directory. It helps a user confirm the directory from which relative paths and file operations will run. The other commands either list files, change directories, or show the current user.