RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


Which command is used to display the current working directory in Linux?

  1. pwd

  2. ls

  3. cd

  4. dir

The correct answer is: pwd

The command used to display the current working directory in Linux is "pwd," which stands for "print working directory." When executed, this command outputs the full path of the directory you are currently in within the filesystem. This is particularly useful for users to know their location in the directory hierarchy, especially when managing files or navigating between directories. In contrast, "ls" is a command used to list the contents of a directory, while "cd" is used to change the current directory. "dir" is also a command that lists directory contents but is not as commonly used in Linux as it is in other operating systems like Windows. Therefore, the function of "pwd" is specifically tailored to showing the current directory path, making it the appropriate choice for this question.