While troubleshooting a legacy daemon you need a one-line command that shows all running processes in an indented, hierarchical tree and includes the job-format columns for session ID (SID), process group ID (PGID) and controlling terminal (TT). The operations handbook prohibits BSD-style options such as ps ax…; you must use dash-prefixed (UNIX/GNU) options only. Which command meets these requirements?
The hierarchy is enabled with the -H option and the job-format columns (SID, PGID, TT, etc.) are added with -j. Combining those with -e selects every process, so:
ps -ejH
produces an indented tree that lists every process together with the job-format fields.
Why the other choices are wrong:
ps -ef - lists every process in full format but does not indent or show the tree.
ps aux - uses BSD syntax (disallowed) and also lacks a tree view.
ps -e --sort=ppid - sorts by parent PID but still shows a flat list with no indentation and omits the job-format columns.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the -H option do in the ps command?
Open an interactive chat with Bash
What are the job-format columns added by the -j option in ps?
Open an interactive chat with Bash
Why is BSD syntax like ps aux disallowed in some cases?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access