Skip to main content
htop is a terminal-based system monitoring tool that displays process statistics and resource usage in a color-coded, human-readable format. It complements the standard top utility by adding mouse support, direct process termination, and improved readability. Use htop to monitor running processes and their full command lines to identify the source of system load.

Installation

htop is available in most major distributions’ standard repositories. On any Debian-based distribution: sudo apt-get install htop -y On any Red Hat-based distribution: sudo yum install htop -y

Run htop

To launch htop, type the following command and press Enter: htop

The user interface explained

The htop interface contains four sections:
  • Section 1 — Interactive bar gauges for processors and memory, which you can customize
  • Section 2 — A quick overview of running tasks, load average, and uptime
  • Section 3 — A detailed view of running processes
  • Section 4 — A list of common keyboard shortcuts, which you can also click with a mouse

Section 1: Processors and memory

CPU utilization

This section displays CPU and memory resources. The number of bars indicates the number of CPU cores — a 4-core server shows bars labeled 0 through 3, a 5-core server shows five bars, and so on. Each bar represents one CPU core. The percentage on the right side of each bar shows current CPU utilization. htop uses color coding to categorize CPU utilization by process type:
  • Blue — Low-priority processes
  • Green — User processes
  • Red — System/kernel processes
  • Yellow/Orange — Hardware Interrupt Request (IRQ) time
  • Magenta — Soft IRQ time
  • Grey — I/O wait time
  • Cyan — Steal time
In the example above, the bars are mostly empty, indicating the CPU is largely idle. Sustained high CPU usage — not occasional spikes — warrants investigation, as it affects overall server performance.

RAM and swap utilization

This section shows current memory usage. RAM is system memory; swap is a portion of disk storage the server uses as overflow memory. In the example, only 383 MB of RAM is in use. htop uses the following colors for memory:
  • Green — Used memory pages
  • Blue — Buffer pages
  • Yellow — Cache pages
When RAM is exhausted, the system falls back to swap space. High usage of both RAM and swap degrades the server’s ability to handle tasks effectively. In the example, swap shows 0K/0K, indicating no swap space is configured.

Section 2: Processes and load average

This section summarizes running tasks. In the example, 33 total processes are present, with 1 currently running. The value labeled thr (18 in the example) represents the number of kernel threads. Load average (also known as the processor queue length) shows the average system load over the past 1, 5, and 15 minutes — displayed as three values such as 0.14, 0.07, and 0.04. To assess whether load is problematic, apply the formula 4 × CPU cores. If the load average exceeds this threshold, investigate further. Sustained high CPU load is a stronger indicator of a problem than high CPU usage alone. Tools such as sysstat can collect and analyze these metrics over time. This section also displays server uptime — the total time the server has been running since its last restart.

Section 3: Process information

When you notice high resource utilization, review the process list to identify the source. Per the htop man page, the default columns are:
  • PID — The process ID
  • USER — The process owner’s username, or user ID if the name can’t be determined
  • PRI — The kernel’s internal priority for the process, usually the NI value plus 20; differs for real-time processes
  • NI — The nice value, from 19 (low priority) to -20 (high priority); only root can lower this value
  • VIRT — Total program size in memory
  • RES — Resident set size: the text and data sections plus stack usage
  • SHR — Size of the process’s shared pages
  • S — Process state:
    • S — Sleeping (idle)
    • R — Running
    • D — Disk sleep (uninterruptible)
    • Z — Zombie (waiting for parent to read its exit status)
    • T — Traced or suspended (for example, by SIGTSTP)
    • W — Paging
  • CPU% — Percentage of CPU time the process currently uses
  • MEM% — Percentage of memory the process currently uses, based on its resident memory size
  • TIME+ — Total time the process has spent in user and system time, measured in clock ticks
  • Command — Full path of the command

Section 4: Keyboard shortcuts

The shortcuts displayed at the bottom of the htop interface are self-explanatory, configurable, and mouse-clickable.

Further reading

For full details on htop’s configuration options, flags, and features, consult the man page: man htop The project’s documentation is also available at https://htop.dev/.
Last modified on October 12, 2026