Multiple choice technology operating systems

What command shows information about processes without terminals?

  1. ps -a

  2. ps

  3. ps -x

  4. ps -f

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The 'ps -x' command shows all processes regardless of terminal association - including those without a controlling terminal (daemon processes, background jobs). 'ps -a' shows processes with terminals. 'ps' alone shows only the current user's terminal processes. 'ps -f' shows full-format listing but doesn't filter by terminal. The -x flag is specifically for processes without terminals.

AI explanation

To answer this question, you need to have knowledge about the ps command in Linux.

Let's go through each option to understand why it is correct or incorrect:

Option A) ps -a - This option displays information about all processes running on the system, regardless of whether they have a terminal or not. This option is incorrect.

Option B) ps - This option displays information about currently running processes with a terminal. This option is incorrect.

Option C) ps -x - This option displays information about all processes without a controlling terminal. This option is correct.

Option D) ps -f - This option displays detailed information about currently running processes, including the parent-child relationship. This option is incorrect.

The correct answer is C) ps -x. This option is correct because it specifically shows information about processes without terminals.