Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux top command

View a live, interactive summary of processes and resource use.

procps-ng

Syntax

Command form
top [OPTION]...

Common options

6 options
OptionWhat it does
-b, --batchRun in batch mode for scripts or redirection.
-n N, --iterations=NSet the number of updates before exit.
-d SECONDS, --delay=SECONDSSet the refresh delay.
-p PIDLISTMonitor selected process IDs.
-u USERShow processes owned by USER.
-HShow individual threads.

Usage examples

2 examples

View a live, interactive summary of processes and resource use.

top

Capture one batch update and show its first lines.

top -b -n 1 | head -n 20

Notes

Interactive keys vary by implementation; press q to quit. Process and system metrics are snapshots, not guarantees about future load.