Process Management

top

Display real-time dynamic view of running processes and system resource usage.

Synopsis

syntax
top [OPTION]...

Examples

Interactive process monitor
top
Single snapshot for scripting
top -bn1 | head -20
Monitor processes for www-data user
top -u www-data
Monitor specific PIDs every 2 seconds
top -d 2 -p 1234,5678

Common options

FlagDescription
-dDelay between updates in seconds
-nNumber of iterations before exit
-pMonitor specific PIDs
-uShow only processes for user
-bBatch mode for scripting

About top

The `top` command display real-time dynamic view of running processes and system resource usage. Process management commands let you monitor, control, and schedule running processes.

Linux is a multitasking operating system, and understanding how to list processes, send signals, adjust priorities, and manage background jobs is vital for system administration and debugging performance issues. The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man top`).

The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Process Management Commands

Other commands in the Process Management category

Related tools