How to Install htop on RHEL?

This article provides a quick guide on how to install htop, an interactive process viewer, on Red Hat Enterprise Linux (RHEL). It covers the necessary prerequisites, including enabling the Extra Packages for Enterprise Linux (EPEL) repository, and the exact package manager commands required for a successful installation across different RHEL versions.

Enabling the EPEL Repository

Because htop is not included in the default upstream RHEL repositories, you must first enable the EPEL (Extra Packages for Enterprise Linux) repository. This repository provides high-quality add-on packages for RHEL.

For RHEL 8 and RHEL 9, you can install and enable the EPEL repository by running the following command with root privileges:

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm

Installing htop

Once the EPEL repository is enabled on your system, you can install htop using the default package manager.

For RHEL 8 and RHEL 9, use the dnf command:

sudo dnf install htop

For older versions like RHEL 7, use the yum command:

sudo yum install htop

Verifying the Installation

After the installation process completes, you can verify that the tool was installed successfully and launch it by typing the command into your terminal:

htop