Htop Linux: Install on Common Distributions

Htop Linux: Install on Common Distributions

Checking which programs are running on Linux can also mean keeping an eye on their resource use. htop is an interactive process viewer that shows process rows alongside CPU and memory meters.

I’ll show you how to choose the package command for your Linux distribution and start htop from a terminal.

TL;DR

Install htop with the package manager for your Linux distribution, then run htop to open its interactive process view. The upstream project lists these package commands. Package installation needs administrator privileges, so follow only the command for your distribution.

  • Debian or Ubuntu: APT
  • Fedora: DNF
  • Arch Linux: pacman

What Is htop on Linux?

The live view combines process rows with CPU and memory meters, letting you inspect activity without leaving the terminal.

Unlike a fixed snapshot, the display updates as you work, and its columns depend on the configuration. A typical screen contains:

Screen areaWhat it shows
CPU metersActivity for processor cores or an aggregate view
Memory metersMemory and swap use
Process listRows with process IDs, owners, state and resource columns
Function-key barShortcuts for search, filtering, tree view and other actions
htop 3.0.1 terminal view with CPU, memory and process meters
Screenshot of htop 3.0.1 (2020-12-07). Image: VulcanSphere via Wikimedia Commons. Licensed under GPL-2.0-or-later. https://commons.wikimedia.org/wiki/File:Htop_3.0.1_screenshot.png

Use our htop command guide for a deeper explanation of its controls. If you only need a basic process list, compare it with the Linux top command.

How to Install and Start htop on Linux Step by Step

Use the package command for your distribution, then open htop from a terminal.

Step 1: Install htop on Debian or Ubuntu

On Debian or Ubuntu, use APT to install the package. Run this command in a terminal:

sudo apt install htop
Not run: installing a package changes system state. Run the command above on Debian or Ubuntu with administrator authorization.

I did not run the install command here because it changes system packages.

Step 2: Install htop on Fedora

Fedora provides htop in its repositories. Use DNF:

sudo dnf install htop
Not run: installing a package changes system state. Run the command above on Fedora with administrator authorization.

I did not run this package operation because it changes system packages.

Step 3: Install htop on Arch Linux

On Arch Linux, install the package from the official repositories with pacman:

sudo pacman -S htop
Not run: installing a package changes system state. Run the command above on Arch Linux with administrator authorization.

This package command also requires administrator authorization and was not run here.

Step 4: Start htop

After installation, launch the process viewer from your terminal:

htop

Read the CPU and memory meters, then scan the process rows. Press F3 to search, F4 to filter, or F5 to view processes as a tree.

To find programs using substantial CPU or memory, see how to find the top running processes. For a fuller tour of htop’s options, use the official project site and htop manual.

What to Check When htop Is Missing

Confirm the package command and repository for the release you are using. Some minimal server installations leave optional packages out of their configured sources.

Refresh the package index or inspect enabled repositories using your distribution’s documentation. On a server, a minimal repository setup may omit optional packages. Avoid adding an unrelated repository or running an old source-build recipe until you have confirmed the supported method for that release.

MessageNext check
Package not foundConfirm the release and its enabled official repositories.
htop: command not foundCheck that the package transaction completed, then open a new terminal.
No administrator accessAsk the system administrator to install the distribution package.

Once htop opens, F10 or Ctrl-C exits the interface. If a function key is intercepted by your terminal, try Ctrl-C instead. Review process termination in Linux before acting on a process.

Conclusion

Install htop from your distribution’s repositories, then run htop to inspect processes and resource use.

For next steps, read the Ubuntu process termination guide before stopping a task, or compare htop with the top command.

Frequently Asked Questions

These answers cover the first checks after installation and link to the relevant documentation.