Linux Command: htop
Interactive process viewer with color and mouse support
htop is an interactive process viewer with an improved, color-coded interface compared to top. It provides real-time monitoring of CPU, memory, and swap usage with visual bar graphs and supports mouse interaction. htop shows individual CPU cores, memory and swap bars, load average, uptime, and a scrollable process list with tree view support. It allows direct process management โ killing, renicing, and sending signals โ without needing to type PIDs. htop is widely considered the superior alternative to top for daily system monitoring. It is more user-friendly, supports horizontal scrolling for long command lines, and provides better process tree visualization.
Syntax
htop [OPTION]...Key Options
-dโ Set update delay in tenths of seconds-uโ Show only processes of a user-pโ Monitor specific PIDs-tโ Start in tree view mode-sโ Sort by column-Cโ Monochrome mode (no colors)
Examples
Standard monitoring
htopTree view
htop -tMonitor specific user
htop -u nginxPro Tips
- F2=Setup, F3=Search, F4=Filter, F5=Tree, F6=Sort, F9=Kill, F10=Quit. Also: / to search, \ to filter, Space to tag.
- Blue=low priority, Green=normal, Red=kernel, Cyan=virtualization. Understanding colors helps identify what is consuming CPU.
- htop is not installed by default on many systems. Install with: apt install htop (Debian/Ubuntu) or yum install htop (RHEL).
Learn more: Full htop reference โ
Related Resources