HTOP command is used to monitor our Linux system’s resources. It provides information related to system processes, system memory, Load average, etc. It is a cross-platform, interactive process viewer. It is quite similar to the ‘top’ command, which comes pre-installed with almost all Linux distributions. But the HTOP command is quite an improvement over the TOP command.
In this tutorial, we will learn to install the HTOP command on Linux.
Recommended Read: How to setup PasswordLess SSH in Linux?
Install HTOP in Ubuntu / Debian
Htop packages for Ubuntu are available on the default Ubuntu repositories, so we are not required to install any other repositories. Simply run the following command to install it,
$ sudo apt install htop
Install HTOP in CentOS / RHEL
Htop packages for CentOS / RHEL are available on the EPEL repositories, so we must install the EPEL repos on our CentOS systems, if not installed. Use the following command to do so,
# yum install epel-release
Now, we can execute the yum command to install it,
# yum install htop
Install HTOP using the source package
Usually, the HTOP versions available on Ubuntu & CentOS, etc are quite the latest but there might be some delay between when new packages are available on the official channel vs when they are available on system repositories. So we can also use the source packages to download & install the latest HTOP version.
Download the latest package (currently 3.0.3) with the following command,
# wget https://dl.bintray.com/htop/source/htop-3.0.3.tar.gz
Next, untar the package,
# tar -xvf htop-3.0.3.tar.gz
Next, we will configure, compile & install the package with the following commands,
# cd htop-3.0.3
# make install
That will install HTOP on our system.
To use htop, simply open the terminal & run,
You can also run the help to check the options that are available with the htop command,
# htop --help
That’s it for this tutorial on how to install HTOP on Linux. Please feel free to send in any questions or queries using the comment box below.