LinuxCommandLibrary

ps

TLDR

List all processes

$ ps aux
copy
List processes for current user
$ ps -u [username]
copy
Show process tree
$ ps -ef --forest
copy
Show specific process
$ ps -p [pid]
copy
Custom output format
$ ps -eo pid,ppid,cmd,%mem,%cpu
copy
List threads
$ ps -eLf
copy

SYNOPSIS

ps [options]

DESCRIPTION

ps reports process status. Shows running processes.
The tool displays system processes. Essential system utility.
ps lists processes.

PARAMETERS

a

All users.
u
User-oriented format.
x
Include processes without tty.
-e
Every process.
-f
Full format.
-p PID
Select by PID.
-u USER
Select by user.
--forest
Process tree.
-o FORMAT
Custom output.

CAVEATS

BSD and POSIX options differ. Use aux or -ef.

HISTORY

ps is a classic Unix process monitoring utility.

SEE ALSO

top(1), htop(1), pgrep(1), kill(1)

Copied to clipboard