How to install htop on RHEL

Performance monitoring is an essential skill for any Linux user. All Linux platforms provide a tool called ‘top’ for this task. I prefer using ‘htop‘, which provides more features. Unfortunately, htop is not available by default on RHEL (or Redhat Enterprise Linux). This post shows you how to install htop for performance monitoring on RHEL.

This article shows an easy way to add htop to your RHEL instance. There are other ways, which include downloading htop and then compiling it on your RHEL instance. This post only discusses adding the repository so that you can download and install htop – the easy way!

Install htop on RHEL

You can read the rest of the post for more detail, but to install htop, you need to add the EPEL repository to your RHEL instance.

Enter the following in your shell to add the repository:

sudo rpm -ivh http://download.fedoraproject.org/pub/epel/7/$(arch)/e/epel-release-7-5.noarch.rpm<br>

Next, you need to install EPEL by entering the following:

sudo yum install epel-release

Lastly, to install HTOP, enter:

sudo yum install htop

Finally, launching htop should be as simple as entering:

htop

Note that Ubuntu 18.04 should have htop installed by default.

What is EPEL?

EPEL (or Extra Packages for Enterprise Linux) is a community-supported repository hosted by the Fedora Community project. Thus, for help with HTOP, contact the developer. The Fedora Community creates, maintains, and manages the EPEL repository, which provides an additional set of quality software packages to Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

What is HTOP?

htop is a system monitoring utility that runs on the shell. It provides many great features for monitoring memory and CPU utilization, threads, and much more. You can monitor your system, view processes, and even manage processes. htop also provides a text-graphical interface! Overall, it is an excellent tool for anyone who knows what’s happening on a Linux instance.

What can you expect when using htop?

htop provides the following useful features:

  • Graphical-text interface – Displays horizontal bar charts that dynamically adjusts based on shell window size.
  • Coloured text – Especially useful when looking for high vs medium memory and CPU utilisation.
  • Highly configurable – Allowing you to set up the tool, search, filter and sort data. You can even view process trees by just pressing F5.
  • Process management – Press one button to kill a misbehaving process!

htop Screenshots

The following view is the default start-up view, which highlights the graphical-text interface:

htop default view
htop default view

The process view in htop is excellent and sometimes provide much-needed clarity:

htop process view when pressing F5
htop process view when pressing F5

This view shows some of the htop setup features that are available:

htop setup view when pressing F2
htop setup view when pressing F2

htop vs top

The top command also provides performance data on Linux machines, but the htop provides colorful text output, a text-graphical interface, and allows the text to scroll.

htop is usually not pre-installed but is as of Ubuntu 18.04 (Bionic). You rock, Ubuntu!

You may also be interested in

About Anto Online

Anto, a seasoned technologist with over two decades of experience, has traversed the tech landscape from Desktop Support Engineer to enterprise application consultant, specializing in AWS serverless technologies. He guides clients in leveraging serverless solutions while passionately exploring cutting-edge cloud concepts beyond his daily work. Anto's dedication to continuous learning, experimentation, and collaboration makes him a true inspiration, igniting others' interest in the transformative power of cloud computing.

View all posts by Anto Online

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.