Which command helps display current directory in Linux?

Prepare for the LPI Linux Essentials Exam with our comprehensive quiz. Study with interactive flashcards and multiple choice questions, with detailed hints and explanations for each. Ace your exam with confidence!

The command that displays the current directory in Linux is "pwd," which stands for "print working directory." When executed, it outputs the full path of the directory you are currently in within the file system. This command is fundamental in navigating the Linux shell, enabling users to know their precise location in the directory structure at any given time.

The other options serve different functions. "dir" is primarily used in DOS and some Unix-like systems to list directory contents, similar to "ls." The "current" option is not a standard command in Linux, and "ls" is used to display the contents of the current directory rather than indicating the current directory itself. Thus, "pwd" is the essential command for this purpose.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy