totn UNIX

UNIX Basic commands: ps

The ps command displays active processes.

Syntax

The syntax for the ps command is:

ps [options]

Options

Option Description
-a Displays all processes on a terminal, with the exception of group leaders.
-c Displays scheduler data.
-d Displays all processes with the exception of session leaders.
-e Displays all processes.
-f Displays a full listing.
-glist Displays data for the list of group leader IDs.
-j Displays the process group ID and session ID.
-l Displays a long listing
-plist Displays data for the list of process IDs.
-slist Displays data for the list of session leader IDs.
-tlist Displays data for the list of terminals.
-ulist Displays data for the list of usernames.

Example

ps -ef
ps -aux

* Please note that there are many flavors of UNIX, so if in doubt, consult your man pages.