HTOP is an interactive process viewer similar to the top command installed in all Linux distributions. It is a free (GPL) process viewer based on the ncurses library. In the most basic sense, top and HTOP are the same except for certain functions available to the latter such as the vertical and horizontal scroll. HTOP also displays all processes, command lines, and process trees running in the system.
Unfortunately, HTOP is not installed by default in CentOS 7. There are two ways to install it. The first way is through the epel repository. The other is by compiling the facility from source. This article focuses on the latter and demonstrates the process in detail.
HTOP on CentOS 7: How to Compile from Source
The first step in compiling htop on CentOS 7 from source is to install the “Development Environment” and the Ncurses libraries.
#Prepare your development environment
[root@samgalope ~]# yum groupinstall "Development Tools"
#Install compilers manually incase Development Tools conk out
[root@samgalope ~]# yum install ncurses ncurses-devel gcc gcc-c++ cmake pkgconfig
The next step is to download the file. For this, the wget is needed. Check this article on how to install wget.
- Official: htop-2.0.2.tar.gz
- Mirror: htop-2.0.2.tar.gz
[root@samgalope ~]# wget http://samgalope.com/tarballs/htop/htop-2.0.2.tar.gz">htop-2.0.2.tar.gz
#Unpack the tar file
[root@samgalope ~]# tar zxvf htop-2.0.2.tar.gz
#Enter the HTOP Directory
[root@samgalope ~]# cd htop-2.0.2
[root@samgalope ~]# ./configure
[root@samgalope ~]# make
[root@samgalope ~]# make install
To test whether or not htop is installed successfully in your CentOS 7, type htop on your terminal as such:
[root@samgalope ~]# htop