Install htop on AlmaLinux, Rocky Linux, RHEL and Oracle Linux

Published on Updated on 5 min read

Two commands are enough on any system in the Red Hat family: enable EPEL, install htop. Why CRB and PowerTools are not needed for it, measured in real containers.

htop displays CPU load, memory usage and running processes in a clear, colored view, and unlike the classic top it can be driven with the arrow keys and the mouse. On systems from the Red Hat family, however, htop is not always preinstalled.

In this guide you install htop on AlmaLinux, Rocky Linux, CentOS Stream and the older CentOS 8. The commands are practically identical on all of these systems, because they all use the dnf package manager.

Which system is running on your server?

CentOS 8 was discontinued at the end of 2021 and no longer receives updates. AlmaLinux and Rocky Linux have taken over as the successors. Both are binary compatible with Red Hat Enterprise Linux and behave exactly like CentOS when it comes to package management.

This is how you find out which version you are running:

cat /etc/os-release

Note down the major version number (8, 9 or 10, for example). You will need it in the next step.

Why htop needs an extra repository

htop is not part of the standard package sources of Red Hat Enterprise Linux, and therefore not part of those of AlmaLinux, Rocky Linux or CentOS either. The package comes from EPEL (Extra Packages for Enterprise Linux), a freely available add-on repository run by the Fedora project. EPEL has to be enabled once before you can use it.

The short answer: two commands

On every system in the Red Hat family it comes down to exactly these two lines:

dnf install epel-release -y
dnf install htop -y

That is all. You need neither the CRB repository nor PowerTools, and you do not have to download an RPM file by hand. We verified this on 27 July 2026 in fresh containers, each time with a real installation:

Systemwithout EPELwith EPEL
AlmaLinux 10No match for argument: htophtop 3.3.0
AlmaLinux 9No match for argument: htophtop 3.3.0
Rocky Linux 9No match for argument: htophtop 3.3.0
Oracle Linux 9No match for argument: htophtop 3.3.0

The same two commands apply to RHEL, CentOS Stream and every other system in this family. On Oracle Linux the activation package is called epel-release as well, and it is included in the repositories that ship with the system.

Why the CRB repository is not needed here

Many guides recommend enabling the CRB repository on top of that (on version 8 it was still called PowerTools):

dnf config-manager --set-enabled crb

For htop this is simply unnecessary. CRB provides development libraries that a few other EPEL packages need in order to build or to resolve their dependencies. htop is not one of them, and it installed cleanly without CRB in all of our tests. Keep the command in mind anyway: if another EPEL package later trips over a missing dependency, CRB is almost always the answer.

Special case: CentOS 8

CentOS 8 was discontinued at the end of 2021 and no longer receives security updates. There, epel-release is missing from the repositories, and the installation runs straight from the file:

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

On such a system, though, dnf often fails as early as refreshing the package list, because the actual CentOS 8 repositories have been switched off as well. In that case the files under /etc/yum.repos.d/ first have to be pointed at the CentOS archive. The better route is to move to AlmaLinux or Rocky Linux, both are binary compatible and are still maintained.

Check the installation

Once the installation is finished, check whether htop is really there and which version you got:

htop --version

After that, install htop:

dnf install htop -y

On Debian and Ubuntu no additional repository is needed, there this is enough:

apt update && apt install htop -y

Start and use htop

The program is started simply with:

htop

The most important keys:

  • F2: Settings, for example the color scheme and the columns shown.
  • F3: Search for a process.
  • F4: Filter the list by a search term.
  • F5: Tree view, shows which process started which.
  • F6: Choose the sort order, by CPU or memory for example.
  • F9: Kill the selected process.
  • F10 or q: Leave htop.

Two command line options are useful on top of that. The first shows only the processes of one specific user, the second watches a single process ID:

htop -u username
htop -p 1234

If you are looking for an even more detailed display with history graphs for CPU, RAM and network, EPEL also carries the program btop.

Common errors

  • "No match for argument: htop": EPEL is not enabled. Use dnf repolist to check whether epel shows up in the list.
  • "Failed to download metadata for repo": Either there is no connection to the outside, or the repository has been switched off. On CentOS 8 the latter is the normal case.
  • "command not found" after the installation: Log in again or call /usr/bin/htop with its full path.
  • The display is garbled: Your terminal is reporting an unsuitable type. Set export TERM=xterm-256color and start htop again.

Frequently asked questions

Why is htop not preinstalled?
htop is not part of the standard package sources of Red Hat Enterprise Linux, and therefore not part of AlmaLinux, Rocky Linux or CentOS either. The package comes from EPEL, a freely available add-on repository.
Do the commands also work on AlmaLinux and Rocky Linux?
Yes. Both distributions are binary compatible with Red Hat Enterprise Linux and use the same package manager, dnf. The commands are identical to the ones used on CentOS.
I am still on CentOS 8. What should I do?
CentOS 8 was discontinued at the end of 2021 and no longer receives security updates. Installing through the EPEL package still works there, but in the long run you should move to AlmaLinux or Rocky Linux.
How do I quit htop again?
With the F10 key or with q. You kill the selected process with F9, and you toggle the tree view with F5.
What is the difference between htop and top?
htop shows the same information in color, can be driven with the arrow keys and the mouse, sorts by any column and displays processes as a tree. In return, top is already present on every system.

htop AlmaLinux Rocky-Linux RHEL Oracle-Linux CentOS EPEL dnf