Htop Launch, Install, and Startup Flags

Core htop installation and launch commands, including startup options for delay, sorting, tree view, and PID filtering.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Install and start

Package-manager and startup examples for common Linux systems.

Install on Debian or Ubuntu

Install htop from APT repositories.

bashANYinstallaptdebian
bash
sudo apt-get update && sudo apt-get install -y htop
Notes

Useful on Debian, Ubuntu, and compatible systems.

Install on RHEL, CentOS Stream, Fedora

Install htop with dnf.

bashANYinstalldnfrhel
bash
sudo dnf install -y htop
Notes

Common on Fedora and modern RHEL-family distributions.

Install on Arch Linux

Install htop with pacman.

bashANYinstallarchpacman
bash
sudo pacman -S htop
Notes

Standard package-manager install for Arch-based systems.

Launch htop

Start the interactive process viewer.

bashANYstartupinteractive
bash
htop
Notes

Shows CPU, memory, and process information in an interactive full-screen UI.

Set update delay in tenths of a second

Control refresh cadence from the command line.

bashANYdelayrefresh
bash
htop -d 20
Notes

A value of 20 refreshes about every 2 seconds.

Show only selected PIDs

Restrict the list to one or more specific processes.

bashANYpidfilter
bash
htop -p 1,1234,5678
Notes

Useful when watching a small set of services or worker processes.

Show only one user's processes

Start htop already filtered by user.

bashANYuserfilter
bash
htop -u www-data
Notes

Handy when investigating app-server or container-user processes.

Sort by a specific column on startup

Pick an initial sort key from the shell.

bashANYsortstartup
bash
htop --sort-key=PERCENT_CPU
Notes

Helpful when you want CPU-heavy tasks surfaced immediately.

Startup modes

Launch into special views such as tree mode or read-only mode.

Start directly in tree view

Show process hierarchy at launch.

bashANYtreehierarchy
bash
htop -t
Notes

Useful for seeing parent-child relationships immediately.

Start in read-only mode

Disable process-changing actions.

bashANYreadonlysafe
bash
htop --readonly
Notes

Good on shared systems when you only need visibility, not renice or kill actions.

Run without color

Use a plain monochrome display.

bashANYcolormonochrome
bash
htop -C
Notes

Useful in limited terminals or for screenshots with minimal color noise.

Start tree view with an explicit sort key

Combine tree mode and sorting from the command line.

bashANYtreesortmemory
bash
htop -t --sort-key=PERCENT_MEM
Notes

Tree sorting applies among direct children within each subtree.

Focus on a process after startup

Use PID filter for targeted monitoring of a service.

bashANYpidpgrepservice
bash
htop -p "$(pgrep -d, -f 'gunicorn|uvicorn')"
Notes

Creates a focused watch list for matching service processes.

Run inside a container shell

Inspect processes visible inside the current container namespace.

bashANYdockercontainer
bash
docker exec -it my-container htop
Notes

Useful when htop is installed in the container image.

Recommended next

No recommendations yet.