EX200 Essential Tools Practice Question
Which command displays the current working directory?
⚠ Common exam trap
Red Hat often tests the distinction between commands that navigate (`cd`), list contents (`ls`), and display the current path (`pwd`), and candidates may confuse `cd` with `pwd` because both are commonly used together in shell navigation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
pwd
The `pwd` command stands for 'print working directory' and is the standard Linux/Unix command to display the absolute path of the current directory. It is part of the GNU Core Utilities and is the correct tool for this task in the Red Hat Enterprise Linux environment tested in EX200.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
pwd
Why this is correct
pwd (print working directory) outputs the absolute pathname of the directory the shell is currently in, beginning from the root (/). It is both a shell builtin and a standalone program at /bin/pwd, and it reads the kernel's per-process current working directory. Without options it prints the logical path, while -P resolves symlinks to show the physical location.
- ✗
ls
Why it's wrong here
ls lists the entries (files and directories) contained within a specified directory, and with no arguments it shows the contents of the current directory, not the path to it. The command simply reads and formats the directory structure; it never reports the directory itself as a path. Thus, while ls is often used to inspect where you are indirectly, it cannot display the current working directory path like pwd does.
- ✗
dir
Why it's wrong here
On most Linux distributions, dir is not a command intended to display the current directory; it is typically a GNU coreutils utility that behaves similarly to ls, listing directory contents in a column format. It is sometimes an alias or a separate binary invoked via shell aliases, but its output is a list of entries, not a path. The Windows cmd.exe dir command also lists files, so the name commonly causes confusion, but neither version prints the current working directory path.
- ✗
cd
Why it's wrong here
cd is a shell builtin whose job is to change the shell's current working directory to a target path (defaulting to $HOME when no argument is given). It does not produce the current working directory path as its regular output; any echo of the destination in cases like `cd -` is a side effect of the navigation, not a query. Using cd to retrieve the current directory would fail because it has no output when given a valid directory as an argument.
Go deeper
Related to this question
About these practice questions
Courseiva writes every EX200 question from scratch — 427 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.