htop
Processes and system
Usage
htopA colourful, mouse-aware rewrite of top where F9 sends a signal directly, but it is not installed by default, so `apt install htop` or `brew install htop` comes first.
Common flags
| Flag | Meaning |
|---|---|
| -u <user> | Start filtered to one user's processes. |
| -p <pid>[,<pid>] | Show only these PIDs. |
| -t | Start in tree view, children under their parent. |
| -d 10 | Refresh delay in tenths of a second, so 10 means one second. |
| F4 / F5 / F6 / F9 | Keys inside htop: filter, tree, sort column, send a signal. |
Examples
htop -u www-dataWatch only the web server processes.
htop -tOpen in tree view to see which process spawned which.
What is running and what is eating the machine. Identifying it comes before killing it.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does htop do?
A colourful, mouse-aware rewrite of top where F9 sends a signal directly, but it is not installed by default, so `apt install htop` or `brew install htop` comes first.
Q. How do I type it?
htop — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
5 are listed here; the full set is in man htop. This command sits under Processes and system.
Related commands
man page: man htop