$linuxjunkies
>

htop(1)

Display and interact with a real-time view of processes and system resource usage.

UbuntuDebianFedoraArch

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

FlagWhat it does
-u USERNAMEShow only processes owned by a specific user
-p PIDShow only the process with the specified PID
-s COLUMNSort by the specified column (e.g., PERCENT_CPU, PERCENT_MEM)
-HHide user threads (show only kernel threads and single-threaded processes)
-tDisplay the tree view of processes (parent-child relationships)
-CDisable colored output
--no-colorStart htop without any color
-d DELAYSet the delay between updates in tenths of a second (default: 15)

Examples

Launch htop with default settings, showing all processes sorted by CPU usage

htop

Display only processes running under the 'postgres' user account

htop -u postgres

Monitor a specific process with PID 1234

htop -p 1234

Sort processes by memory usage percentage in descending order

htop -s PERCENT_MEM

Show process tree view to see parent-child relationships

htop -t

Update the display every 0.5 seconds for faster refresh rate

htop -d 5

Related commands