210-250 · Question #152
What Linux commands show the process for all users?
The correct answer is A. ps -a. The 'ps -a' command displays running processes for all users associated with a terminal, making it the correct choice for viewing processes across all user accounts.
Question
What Linux commands show the process for all users?
Options
- Aps -a
- Bps -u
- Cps -d
- Dps -m
How the community answered
(28 responses)- A93% (26)
- B4% (1)
- D4% (1)
Why each option
The 'ps -a' command displays running processes for all users associated with a terminal, making it the correct choice for viewing processes across all user accounts.
The '-a' flag selects all processes associated with a terminal except session leaders, effectively listing active processes running under all user accounts on the system. This distinguishes it from flags that change output format or filter by session leadership, making it the standard option for viewing all user processes.
The '-u' flag outputs processes in a user-oriented format showing ownership and CPU/memory details, but it changes display format only and does not filter to show processes for all users.
The '-d' flag selects all processes except session leaders, which is a different process-scope filter unrelated to displaying processes for all users.
The '-m' flag displays threads after processes on many systems, not processes belonging to all users.
Concept tested: Linux ps command flags for all-user process listing
Source: https://man7.org/linux/man-pages/man1/ps.1.html
Topics
Community Discussion
No community discussion yet for this question.