htop(1)
Display and interact with a real-time view of processes and system resource usage.
Synopsis
htop [OPTION]Description
htop is an interactive process viewer and system monitor that displays CPU, memory, and swap usage in real-time. Unlike top, htop allows you to scroll vertically and horizontally, select processes with the mouse or keyboard, and kill or renice processes without typing their PID. It provides a more user-friendly and colorized interface.
htop shows a summary of system resources at the top (CPU cores, memory, swap) followed by a dynamic list of running processes. Press 'h' while running to see interactive help, or use arrow keys to navigate.
Common options
| Flag | What it does |
|---|---|
-u USERNAME | Show only processes owned by a specific user |
-p PID | Show only the process with the specified PID |
-s COLUMN | Sort by the specified column (e.g., PERCENT_CPU, PERCENT_MEM) |
-H | Hide user threads (show only kernel threads and single-threaded processes) |
-t | Display the tree view of processes (parent-child relationships) |
-C | Disable colored output |
--no-color | Start htop without any color |
-d DELAY | Set the delay between updates in tenths of a second (default: 15) |
Examples
Launch htop with default settings, showing all processes sorted by CPU usage
htopDisplay only processes running under the 'postgres' user account
htop -u postgresMonitor a specific process with PID 1234
htop -p 1234Sort processes by memory usage percentage in descending order
htop -s PERCENT_MEMShow process tree view to see parent-child relationships
htop -tUpdate the display every 0.5 seconds for faster refresh rate
htop -d 5