top Cheatsheet - Process Monitoring

All essential top commands organized by use case, with 52+ entries you can copy and run directly. Find the right command fast when you need it.

SysOps·52 commands·Last updated 2026-07-21
Back to SysOps

top Basics 6

top
Launch top monitoring
top -d 5
Set refresh interval to 5 seconds
top -p 1234
Monitor a single PID
top -u username
Monitor a user's processes only
top -n 10
Exit after 10 refreshes
top -b -n 1 > top.log
Batch mode, write to a file

top Interactive 8

h / ?
Show help
q
Quit
Space
Immediate refresh
k
Kill a process (enter PID)
r
Renice a process (enter PID)
n
Set number of refreshes
s
Set refresh interval
W
Save config to ~/.toprc

top Sort & Display 10

M
Sort by memory
P
Sort by CPU
T
Sort by time
N
Sort by PID
c
Toggle full command path
H
Toggle threads
i
Toggle idle processes
1
Show per-core CPU usage
f
Select displayed fields
o
Sort field

htop Basics 5

htop
Launch htop (needs install)
htop -d 5
Set refresh interval to 5 seconds
htop -u username
Monitor a user only
htop --no-color
No color output
htop --tree
Tree view

htop Interactive 17

F1 / h / ?
Show help
F2 / S
Setup
F3 / /
Search
F4 / \
Filter
F5 / t
Tree view
F6 / >
Sort field
F7 / [
Lower priority
F8 / ]
Raise priority
F9 / k
Kill process
F10 / q
Quit
Space
Tag a process
U
Untag all
c
Show full command path
H
Show/hide user processes
K
Show/hide kernel threads
p
Show/hide full path
t
Show/hide time column

Load Average 6

1 min / 5 min / 15 min
System average load (1/5/15 min)
> CPU cores
System overloaded
tasks: total / running / sleeping / stopped / zombie
Process statistics
%Cpu(s): us / sy / ni / id / wa / hi / si / st
CPU usage breakdown
MiB Mem: total / free / used / buff/cache
Memory usage
MiB Swap: total / free / used
Swap usage

Tips

  • top ships with the system; htop needs install but is friendlier and more powerful.
  • Load average above the core count means overload — investigate high-load processes.
  • High wa (IO wait) means disk bottleneck; high hi/si (interrupts) means network/hardware issues.

Official References

Commands are compiled from the official docs below. Click to verify the latest usage.

Maintained by LaoHand

Publicly updated on Jul 21, 2026, continuously proofread against official docs.

Contact Us

Wrong command or description? Send us corrections, business inquiries or product feedback by email.

Contact Us