man.lsPlain-English help for Unix commands

top Watch running processes update live

Shows a live, refreshing table of the processes using the most CPU or memory, plus overall load. You reach for it when the machine feels slow and you want to see what is busy. It runs until you press q.

Synopsis

top [-o KEY] [-O SKEY] [-n NPROCS] [-s DELAY]
top -l SAMPLES [-n NPROCS]

Common options

Option or formWhat it does
-o KEYSort by a column, highest first. Keys include cpu, mem, pid, time and command (macOS)
-O SKEYSecondary sort column, used to break ties (macOS)
-n NPROCSShow only this many processes (macOS)
-s SECONDSWait this many seconds between updates. The default is 1 (macOS)
-l SAMPLESLogging mode. Print this many samples as plain text, then exit. Use it in scripts and when saving output (macOS)
-uShortcut for -o cpu -O time (macOS)
-pid PIDShow only the process with this ID (macOS)
-stats KEYSChoose which columns to display, as a comma-separated list such as pid,command,cpu,mem (macOS)

Examples

Open the live view
top
Sort by CPU use
top -o cpu
Sort by memory use
top -o mem
Update every five seconds
top -s 5
Take one sample of the top 10 processes and exit
top -l 1 -n 10

Notes

See also

Last reviewed 2026-10-07.