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 of the following commands is used to display the current working directory in Linux?

  1. pwd

  2. cd

  3. dir

  4. ls

The correct answer is: pwd

The command that is used to display the current working directory in Linux is 'pwd'. This stands for "print working directory," and when executed in the terminal, it outputs the full pathname of the directory that you are currently in. In contrast, 'cd' is the command used to change the current directory rather than display it. Although 'dir' and 'ls' are commands that list files and directories within the current directory, they do not provide the pathname of the current directory itself. Understanding these distinctions is crucial for navigating the Linux file system efficiently.