XK0-006 System Management Practice Question
Which command is used to display the current process hierarchy in a tree format?
⚠ Common exam trap
The trap is confusing 'list all processes' (ps aux, top) with 'show process hierarchy as a tree' — candidates who skim the question pick ps aux because it is the most familiar process-listing command.
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
✓
pstree
The pstree command displays running processes as a tree, showing parent-child relationships with branches, which is exactly what the question asks for. It reads process information from /proc and renders the hierarchy visually, optionally with -p to show PIDs and -u to show users. None of the other commands present the hierarchy in tree format.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
pstree
Why this is correct
pstree reads the process table and renders parent-child relationships as an indented tree, showing the hierarchy from init or the specified PID downwards. This directly satisfies the requirement to display the current process hierarchy in tree format.
- ✗
lsproc
Why it's wrong here
lsproc is not a standard Linux command; no such utility exists in default installations, so it cannot display anything. It is tempting because the name suggests listing processes, but a command that does not exist would be the correct answer only if the question asked which option is invalid.
- ✗
ps aux
Why it's wrong here
ps aux lists every process with user, PID, CPU, memory and command details in a flat table, without showing parent-child relationships. It is tempting because it is the standard process-inspection command, but it would be the correct choice when you need full details of all running processes rather than hierarchy.
- ✗
top
Why it's wrong here
top shows a live, flat, sorted list of processes by resource consumption, refreshing periodically; it does not render parent-child relationships as a tree. It is tempting because it is a genuine process-monitoring tool, but it would be the correct choice when identifying which processes are consuming the most CPU or memory.
Go deeper
Related to this question
About these practice questions
One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.