LPIC-1 Exam 101 v5 (Linux Administrator) — Question 106
Which of the following commands print the current working directory when using a Bash shell? (Choose two.)
Answer options
- A. echo "${PWD}"
- B. echo "${WD}"
- C. printwd
- D. pwd
- E. echo "${pwd}"
Correct answer: A, D
Explanation
The correct answers are A and D. The command 'pwd' is a standard command that prints the current working directory, while 'echo "${PWD}"' uses the PWD environment variable to achieve the same result. The other options either refer to incorrect environment variables or commands that do not exist in Bash.