man.lsPlain-English help for Unix commands

ps Show a snapshot of running processes

Lists the processes running on the machine at the moment you run it. You reach for it to find a process ID, check whether something is still running, or see what is using memory or CPU. Unlike top, it prints once and exits.

Synopsis

ps [OPTION]...
ps -p PID[,PID]... [-o KEYWORD[,KEYWORD]...]

Common options

Option or formWhat it does
auxBSD style, written without a dash. Shows every user's processes (a), with the owner (u), including ones with no terminal (x). The usual "show me everything" command on macOS
-efPOSIX style. -e selects every process and -f gives a full listing with parent PID and start time. Works on macOS and Linux
-p PIDShow only the process or comma-separated processes with these IDs
-u USERShow processes belonging to the named user. On macOS this takes user names, not numeric IDs
-o KEYWORDChoose the columns, for example -o pid,ppid,%cpu,%mem,comm. Add =TEXT to a keyword to rename its header, or leave the text empty to hide it
-rSort by current CPU use, highest first (macOS and BSD)
-mSort by memory use, highest first (macOS and BSD)
-AShow every process, including other users' and those with no terminal. -e does the same

Examples

Show your own processes in this terminal
ps
Show the shell that is running this command
ps -p $$ -o pid,comm
Show every process, with owner and resource use (BSD style)
ps aux | head -5
Show every process in the POSIX full format
ps -ef | head -5
Find a process by name without matching grep itself
ps aux | grep '[n]ginx'
Top ten memory users on macOS
ps -A -m -o pid,%mem,comm | head -11

Notes

See also

Last reviewed 2026-10-07.