Name

ps

Synopsis

ps [options]

Report on active processes. ps has three types of options. GNU long options start with two hyphens, which are required. BSD options may be grouped and do not start with a hyphen, while Unix98 options may be grouped and require an initial hyphen. The meaning of the short options can vary depending on whether or not there is a hyphen. In options, list arguments should either be comma-separated or space-separated and placed inside double quotes. In comparing the amount of output produced, note that e prints more than a and l prints more than f for each entry.

Options

nums, p nums, -p nums, --pid=nums

Include only specified processes, which are given in a space-delimited list.

-nums, -s nums, --sid=nums

Include only specified session IDs, which are given in a space-delimited list.

[-]a

As a, list all processes on a terminal. As -a, list all processes except session leaders and processes not associated with a terminal.

[-]c

As -c, show different scheduler information with -l. As c, show the true command name.

-C cmds

Select by command name.

--cols=cols, --columns=cols

Set the output width (the number of columns to display).

-d

Select all processes except session leaders.

-e, -A

Select all processes.

e

Include environment information after the command.

[-]f, --forest

As -f, display full listing. As f or --forest, display “forest” family tree format, with ASCII art showing the relationships.

-F

Set extra-full format; implies -f.

-g list, -G list, --group=groups, --Group=groups

For

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.