Difficulty: Easy
Correct Answer: pwd
Explanation:
Introduction / Context:
Navigating the filesystem from a terminal requires awareness of where you are. The command that outputs the current working directory is fundamental for scripting, troubleshooting, and documentation of steps in Linux/Unix environments.
Given Data / Assumptions:
Concept / Approach:
The pwd command (print working directory) writes the absolute path of the current directory to standard output. It can be used standalone or in scripts to capture context. Some shells also provide an internal builtin with the same name; either way, functionality is the same.
Step-by-Step Solution:
Verification / Alternative check:
Cross-check with ls -ld . and readlink -f . where available. In most cases, pwd suffices and is portable.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
pwd.
Discussion & Comments