What 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 Linux terminal, this command outputs the absolute path of the directory in which the user is currently operating. This information is crucial for users to understand their location within the filesystem, especially when navigating through directories or working with files.

The other commands serve different purposes: "cd" is used to change directories, "ls" lists the contents of a directory, and "whereami" is not a standard command in Linux for this purpose and does not exist by default in most distributions. Therefore, pwd is the appropriate command to obtain the current working directory.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy