Skip to main content

htop Cheatsheet

By Dejan Panovski Updated on Download PDF

Quick reference for monitoring processes, sorting tasks, filtering output, and managing processes with htop in Linux

The `htop` command is an interactive process viewer for Linux with color-coded meters, search, filtering, tree view, and keyboard shortcuts for managing processes. This cheatsheet covers the most useful startup options, navigation keys, sorting controls, process actions, and display settings.

Basic Usage

Start htop and limit the view when needed.

CommandDescription
htopStart htop with the default interactive view
htop -u usernameShow only processes owned by one user
htop -p 1234,5678Monitor only the specified PIDs
htop -tStart in tree view
sudo htopRun with elevated privileges to manage more processes

Move around the process list and find what you need quickly.

KeyDescription
Arrow keysMove up and down through processes
Page Up / Page DownScroll one page at a time
Home / EndJump to the top or bottom of the list
F3 or /Search for a process by name
F4 or \\Filter the process list
SpaceTag or untag the selected process
UClear all tags

Sorting and Views

Change how processes are grouped and sorted.

Key / CommandDescription
PSort by CPU usage
MSort by memory usage
TSort by running time
F5Toggle tree view
F6Choose a sort column
htop -s PERCENT_MEMStart sorted by memory usage
HToggle display of user threads
KToggle display of kernel threads

Process Actions

Manage processes directly from inside htop.

KeyDescription
F7Decrease nice value (raise priority)
F8Increase nice value (lower priority)
F9Send a signal to the selected process
15 SIGTERMAsk a process to exit cleanly
9 SIGKILLForce a process to stop immediately
2 SIGINTInterrupt a process, similar to Ctrl+C
q or F10Quit htop

Startup Options

Useful options for changing the initial view.

CommandDescription
htop -d 20Refresh every 2 seconds
htop -CUse monochrome mode
htop -HHighlight new and old processes
htop --readonlyDisable process-kill and renice actions
htop --sort-key PERCENT_CPUStart sorted by CPU usage

Customization

Adjust the display and save the layout.

Key / PathDescription
F2Open the setup menu
ColumnsAdd, remove, or reorder process columns
MetersChange header meters and display style
Display optionsToggle tree lines, thread names, and other UI settings
~/.config/htop/htoprcConfiguration file where settings are saved

Troubleshooting

Quick checks for common htop issues.

IssueCheck
htop: command not foundInstall htop with apt or dnf first
Cannot renice a processRun htop with sudo to change priorities for other users’ processes
Cannot kill a processConfirm you have permission, then use F9 with SIGTERM first
Process list is too noisyUse F4 to filter or start with -u USER
Fast processes disappearLower the update interval with -d

Use these guides for the full walkthroughs.

GuideDescription
htop Command in LinuxFull htop guide with examples
top Command in LinuxMonitor processes in real time with top
ps Command in LinuxList and inspect processes
kill Command in LinuxSend signals to processes by PID
pstree Command in LinuxView parent and child process relationships