Install htop on AlmaLinux, Rocky Linux, RHEL and Oracle Linux
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:
| System | without EPEL | with EPEL |
|---|---|---|
| AlmaLinux 10 | No match for argument: htop | htop 3.3.0 |
| AlmaLinux 9 | No match for argument: htop | htop 3.3.0 |
| Rocky Linux 9 | No match for argument: htop | htop 3.3.0 |
| Oracle Linux 9 | No match for argument: htop | htop 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 repolistto 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/htopwith its full path. - The display is garbled: Your terminal is reporting an unsuitable type. Set
export TERM=xterm-256colorand start htop again.
Frequently asked questions
Why is htop not preinstalled?
Do the commands also work on AlmaLinux and Rocky Linux?
I am still on CentOS 8. What should I do?
How do I quit htop again?
What is the difference between htop and top?
2023-2026 KernelHost GmbH. All rights reserved. This guide is protected by copyright. Republishing it on other websites, in whole, in part or in edited form, is not permitted without our written consent. Quoting with a source credit and a link is expressly welcome.

