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 form | What it does |
|---|---|
-o KEY | Sort by a column, highest first. Keys include cpu, mem, pid, time and command (macOS) |
-O SKEY | Secondary sort column, used to break ties (macOS) |
-n NPROCS | Show only this many processes (macOS) |
-s SECONDS | Wait this many seconds between updates. The default is 1 (macOS) |
-l SAMPLES | Logging mode. Print this many samples as plain text, then exit. Use it in scripts and when saving output (macOS) |
-u | Shortcut for -o cpu -O time (macOS) |
-pid PID | Show only the process with this ID (macOS) |
-stats KEYS | Choose which columns to display, as a comma-separated list such as pid,command,cpu,mem (macOS) |
Examples
top
top -o cpu
top -o mem
top -s 5
top -l 1 -n 10
Notes
- top is interactive and takes over the terminal. Press q to quit. It cannot be used in a pipeline unless you use -l (macOS) or -b (Linux).
- The options on this page are for macOS. Linux top comes from procps and differs: sort with -o %CPU or by pressing Shift+P or Shift+M, use -b for batch mode, -n for the number of updates, and -d for the delay.
- A high CPU figure can pass 100%. On macOS and Linux, 100% means one full core, so a busy multi-threaded process can show several hundred.
- To stop a process you found in top, note its PID and use the kill command. On Linux top you can also press k.
- For a one-off listing you can save or search, use ps instead.
See also
Last reviewed 2026-10-07.