Which command is used to display the current working directory?

Prepare for the LPI 101-500 Certification Exam. Utilize flashcards, navigate multiple choice questions, and benefit from hints and explanations. Begin your Linux certification journey today!

The command used to display the current working directory is "pwd," which stands for "print working directory." When executed in a terminal session, this command outputs the full path to the directory that the user is currently in. It's a fundamental command in Linux, essential for users to understand their location within the filesystem hierarchy.

The other commands serve different purposes: "cd" is used to change the current directory; "ls" lists the contents of a directory; and "dir" is a command used to list directory contents in some environments, though it's more commonly associated with DOS-like systems rather than Linux. Thus, "pwd" is the correct command to reveal the current location in the filesystem.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy