htop Command
Beginner Process Management man(1)Interactive process viewer with color and mouse support
👁 11 views
📅 Updated: Mar 15, 2026
SYNTAX
htop [OPTION]...
What Does htop Do?
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.
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.
Options & Flags
| Option | Description | Example |
|---|---|---|
| -d | Set update delay in tenths of seconds | htop -d 10 |
| -u | Show only processes of a user | htop -u www-data |
| -p | Monitor specific PIDs | htop -p 1234,5678 |
| -t | Start in tree view mode | htop -t |
| -s | Sort by column | htop -s PERCENT_MEM |
| -C | Monochrome mode (no colors) | htop -C |
| --no-mouse | Disable mouse support | htop --no-mouse |
Practical Examples
#1 Standard monitoring
Opens the interactive process viewer with color-coded bars and process list.
$ htop#2 Tree view
Shows processes in a tree hierarchy showing parent-child relationships.
$ htop -t#3 Monitor specific user
Filters to show only processes owned by the nginx user.
$ htop -u nginx#4 Sort by memory
Starts sorted by memory usage percentage.
$ htop -s PERCENT_MEM#5 Fast refresh
Updates every 0.5 seconds (5 tenths) for high-resolution monitoring.
$ htop -d 5#6 Monitor specific processes
Monitors only PHP-FPM worker processes.
$ htop -p $(pgrep -d, php-fpm)Tips & Best Practices
Key shortcuts: F2=Setup, F3=Search, F4=Filter, F5=Tree, F6=Sort, F9=Kill, F10=Quit. Also: / to search, \ to filter, Space to tag.
CPU bar colors: Blue=low priority, Green=normal, Red=kernel, Cyan=virtualization. Understanding colors helps identify what is consuming CPU.
Not always pre-installed: htop is not installed by default on many systems. Install with: apt install htop (Debian/Ubuntu) or yum install htop (RHEL).
Frequently Asked Questions
How do I kill a process in htop?
Select the process with arrow keys, press F9 (Kill), choose signal (SIGTERM=15 or SIGKILL=9), press Enter.
How do I filter processes?
Press F4 (or \) and type a filter string. Only processes matching the filter are shown. Press F4 again to clear.
How do I install htop?
apt install htop (Debian/Ubuntu), yum install htop (RHEL/CentOS), pacman -S htop (Arch), or brew install htop (macOS).
Related Commands
More Process Management Commands
Master Linux with Professional eBooks
Curated IT eBooks covering Linux, DevOps, Cloud, and more
Browse Books →