htop – Interactive Process Viewer for Unix Systems
Introduction to htop
htop is an interactive, cross-platform process viewer and system monitor for Unix-like systems. As a modern alternative to the classic top command, htop provides a more user-friendly interface with color-coded output, mouse support, and the ability to perform actions on processes without entering PIDs. The software gives real-time insights into system resource usage including CPU, memory, and swap utilization.
htop displays a complete list of running processes with their resource usage, and allows sorting, filtering, and tree view of process hierarchies. Unlike top, htop allows horizontal and vertical scrolling to view all processes and their full command lines, making it an indispensable tool for system administrators and power users.
Key Features
htop provides real-time CPU, memory, and swap monitoring with graphical meters, process tree view, process filtering and searching, mouse support, color-coded output, and the ability to kill processes or change their priority. Support for different platforms includes Linux, macOS, FreeBSD, and other Unix-like systems.
Installation on Linux
# Ubuntu/Debian
sudo apt install htop
# Fedora
sudo dnf install htop
# Arch Linux
sudo pacman -S htop
# From source
git clone https://github.com/htop-dev/htop.git
cd htop
./autogen.sh
./configure
make
sudo make install
Installation on macOS
# Via Homebrew
brew install htop
Installation on Windows
# htop is not native to Windows
# Use WSL (Windows Subsystem for Linux)
wsl
sudo apt install htop
htop
# Or use Windows alternatives:
# - Process Hacker
# - Process Explorer
Interface Overview
# Header:
# - CPU meters (per core)
# - Memory bar
# - Swap bar
# - Tasks, load average, uptime
# Process list columns:
# PID Process ID
# USER Owner
# PRI Priority
# NI Nice value
# VIRT Virtual memory
# RES Resident memory
# SHR Shared memory
# S State (S=sleep, R=running, Z=zombie)
# CPU% CPU usage
# MEM% Memory usage
# TIME+ CPU time
# Command Full command line
Navigation and Controls
# Movement
Up/Down/PgUp/PgDn Navigate processes
Home/End First/Last process
Left/Right Scroll horizontally
# Actions
Space Tag process
U Untag all
c Tag children
k Kill process
+/- Expand/Collapse tree
# Views
F1 or h Help
F2 or S Setup
F3 or / Search
F4 or \ Filter
F5 or t Tree view
F6 or > Sort column
F7/F8 Nice -/+
F9 or k Kill
F10 or q Quit
Sorting
# Sort by column
F6 then select column
# Quick sort keys:
P Sort by CPU%
M Sort by MEM%
T Sort by TIME
I Invert sort order
# Command line:
htop --sort-key=PERCENT_CPU
htop --sort-key=PERCENT_MEM
Filtering and Searching
# Search (incremental)
F3 or /
# Type process name
# Press F3 to find next
# Filter (persistent)
F4 or \
# Type filter text
# Only matching processes shown
# Press Esc or F4 to clear
# Filter by user
u
# Select user from list
Process Management
# Kill process
F9 or k
# Select signal:
# 15 SIGTERM (graceful)
# 9 SIGKILL (force)
# 2 SIGINT (interrupt)
# Change priority (nice)
F7 Decrease nice (higher priority)
F8 Increase nice (lower priority)
# Requires root for negative nice
# Change CPU affinity
a Set CPU affinity
# Select cores
Tree View
# Toggle tree view
F5 or t
# In tree view:
+/- Expand/Collapse node
* Expand all
# Shows parent-child relationships
# Helps identify process hierarchies
Configuration
# Setup (F2)
# Customize meters, columns, colors
# Sections:
# - Meters (header layout)
# - Display options
# - Colors
# - Columns
# Config location:
# ~/.config/htop/htoprc
# Command line options:
htop -d 10 # Delay (tenths of seconds)
htop -u username # Filter by user
htop -p 1234,5678 # Monitor specific PIDs
htop -t # Start in tree mode
htop -s PERCENT_MEM # Start sorted by memory
Customizing Meters
# F2 > Meters
# Available meters:
# - CPU (all/per core)
# - Memory
# - Swap
# - Tasks
# - Load average
# - Uptime
# - Battery
# - Hostname
# - Clock
# - Disk IO
# - Network
# Meter styles:
# - Bar
# - Text
# - Graph
# - LED
Useful Shortcuts
l Show open files (lsof)
s System call trace (strace)
e Show environment variables
w Show who's logged in
H Toggle user threads
K Toggle kernel threads
I Invert sort order
0-9 Set refresh delay
Command Line Options
# Common options
htop Start htop
htop -d 5 Update every 0.5 seconds
htop -u root Show only root's processes
htop -p 1,2,3 Monitor specific PIDs
htop -t Start in tree view
htop -C Monochrome mode
htop --readonly Read-only mode (no kill/renice)
# Version info
htop --version
Alternatives
# Similar tools:
# btop (htop with graphs)
# bashtop (Bash version)
# glances (Python, more info)
# nmon (AIX-style)
# atop (advanced)
# Install btop:
sudo apt install btop
# or
brew install btop
Conclusion
htop transforms system monitoring into an intuitive, interactive experience. Its color-coded display, mouse support, and extensive customization options make it far more accessible than traditional tools while providing the same detailed information. Whether troubleshooting performance issues or simply monitoring system health, htop is an essential tool for any Unix-like system administrator or power user.
Download Options
Download htop – Interactive Process Viewer for Unix Systems
Version 3.3.x
File Size: 1-5 MB
Download NowSafe & Secure
Verified and scanned for viruses
Regular Updates
Always get the latest version
24/7 Support
Help available when you need it