Problem Statement
Which command is used to display the current working directory?
Explanation
The pwd (print working directory) command displays the full path of your current location in the filesystem. It's one of the most basic navigation commands and helps you understand where you are in the directory structure, especially useful when working with absolute and relative paths.
Pwd is particularly helpful in shell scripts to ensure you're in the correct directory before executing commands, or when navigating complex directory structures. It takes no arguments in its basic form and simply outputs the current directory path.
Related commands include cd (change directory) for navigation, ls (list) for viewing directory contents, and dirs for displaying the directory stack. Understanding pwd is fundamental for command-line navigation and is often one of the first commands taught to Linux beginners.