Home » Guides » Install HTOP on Linux Distros With Ease – A Guide For Ubuntu, Debian, CentOS, RHEL, etc.

Install HTOP on Linux Distros With Ease – A Guide For Ubuntu, Debian, CentOS, RHEL, etc.

If you have already used HTOP then surely, you do realize the need for such a tool for any system. However, those unfamiliar with it should also know that as an open-source project, HTOP is an analytical tool that monitors a computer’s processes.

It is not only valuable for monitoring and troubleshooting issues but also able to spot resource-intensive programs that might hinder your tasks. It is because of this, that we have come up with this comprehensive guide on HTOP installation on different Linux distros.

Table Of Contents

What is HTOP?

HTOP is a monitoring tool that displays statistics and data related to a computer’s processes and resource usage. It is designed as an alternative to TOP and thus is often compared to it. However, unlike TOP, HTOP can show a list of all the running processes rather than one. It is also colored to provide visual information regarding things like processor health, swap, and computer memory. 

It is an interactive system monitor, process manager, and viewer, suited for UNIX systems. Furthermore, it is a greatly flexible tool, much more than TOP when it comes to how system processes can be viewed. HTOP uses a processes display tree and colors to provide resource statistics. As such, it has three primary roles:

  • System monitoring
  • Process viewing
  • Process management
htop, install htop on linux
Htop

TOP vs HTOP

HTOP was developed as a direct replacement for TOP, thus, it was given that both tools would be compared, which is why we have included a chart that compares these two:

HTOPTOP
It has a better text-based interface.It is very basic.
Uses colors predominantly Monochromatic
You can scroll vertically and horizontallyNo scrolling at all
Mouse supportedOnly supports keyboard as input
Shows the kernel and threads Only shows the process without any context
You can control processes directly from the interfaceTo control a process, you need to leave the tool
You can terminate multiple processes at onceYou need PID to kill a single process

Different Use Cases for HTOP

If you find yourself asking when HTOP is needed, then do read the following table as it presents a few use cases for the same:

Use CasesDescription
Monitoring system processesShows a list of currently running processes and their resource usage
Identifying resource-hogging programsHelps with identifying those programs that are taking lots of computing power
Troubleshooting performance issuesSince it can show all the current activities, it can help with solving performance issues such as slow computing or memory storage problems
Process management You can overview, manage and terminate the program accordingly as it provides you with current data
System health monitoringYou can manage your system health by keeping an eye on the overall performance of the system.

How to Install HTOP on Linux?

Now, let us talk about installing HTOP on different Linux distros. The good news is that it comes natively in most Linux archives, and thus it is very easy to install it. You can even build it from source, as it is available on Git.

Method 1. Install HTOP on Linux From The Official Website

Users can first go to the official HTOP website and find the link to the stable version, which is a tarball package. All they need to do then is to download the package and unpack it. Here’s how:

Step 1. Go to the GitHub page to download the stable version of HTOP.

Step 2. Now use the Terminal and navigate to the directory where you downloaded the tar package.

cd htop<VERSION>

Step 3. Compile the package and install it.

./configure
make
sudo make install

Method 2. Compile HTOP Using The Git Repository

You can also use the Git repo to build HTOP, however, to build it from source, you need Development Tools and Ncurses installed. Thus:

Step 1A. Those using Debian, Ubuntu, or Mint, should use the following command:

sudo apt-get install build-essential
sudo apt-get install libncurses5-dev libncursesw5-dev

Step 1B. Similarly, those using RHEL, CentOS or Fedora can use:

sudo yum groupinstall "Development Tools"
sudo yum install ncurses ncurses-devel

Step 2. Now, fetch the package from the Git repo:

wget -O htop-<VERSION>.tar.gz https://github.com/htop-dev/htop/<VERSION>
tar xvfvz htop-<VERSION>.tar.gz

Step 3. Locate the package using the CD command:

cd htop-<VERSION>

Step 4. Finally, compile it

./configure
make
sudo make install

Method 3. Installing HTOP on GoboLinux using Compile

Installing anything on GoboLinux is very simple as all you need to do is use the Compile command, here’s how:

compile htop

Method 4. Compiling on GoboLinux Manually

If you want to, you can also build/compile HTOP manually on GoboLinux, however, beware, as it is not recommended.

Step 1. First download the tarball package and place it at  /Data/Compile/Archives. You can download it from the GitHub website.

Step 2. Now, go into the folder where you have the source package.

cd /Data/Compile/Archives

Step 3. Run the PrepareProgram command to generate the directory in DOSBox CVS

PrepareProgram -t /Data/Compile/Archives CVS

Step 4. Run it again without options to run configure

PrepareProgram /Data/Compile/Archives CVS

Step 5. Now, compile using the Make command:

make

Step 6. Then run the following to install the program into the Programs-tree

SandboxInstall /Data/Compile/Archives CVS

Step 7. Finally, run a SymlinkProgram to link the file to the LHS tree.

SymlinkProgram /Data/Compile/Archives CVS

Method 5. Install HTOP On Linux Using Native Repositories

As mentioned above, HTOP is available in most modern Linux distros archives and can be installed directly, here’s how:

On Debian

sudo apt install htop

On Ubuntu

sudo apt install htop

For Linux Mint

sudo apt install htop

On Fedora

sudo dnf install htop

For CentOS 8/7

sudo yum install epel-release
sudo yum install htop

On RHEL 8

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum install htop

On RHEL 7

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install htop

Those Running Rocky Linux/AlmaLinux

sudo yum install epel-release
sudo yum install htop

On Gentoo

emerge sys-process/htop

For Arch Linux

pacman -S htop

On OpenSUSE

sudo zypper install htop

Method 6. Installing on Red Hat using Snap

Snaps are third-party application packages that can run directly on most Linux distros. However, since it is a third-party solution, we will only demonstrate it for a single distro. (Also note that the installation method is the same for most distros)

Step 1. First, add the EPEL repository to RHEL 9 with the following command:

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

Step 2. Now install Snap:

sudo yum install snapd

Step 3. Now, enable systemd, the unit that manages the main snap communication socket:

sudo systemctl enable --now snapd.socket

Step 4. Then enable classic snap support to create a symbolic link between /var/lib/snapd/snap and /snap:

sudo ln -s /var/lib/snapd/snap /snap

Step 5. Finally, install HTOP via Snap

sudo snap install htop
Gilbert John Avatar