1. Htop interface display
"Htop is an interactive real-time process monitoring application for Linux/Unix systems and a replacement for the top command, which is the default process monitoring tool preinstalled on all Linux operating systems.
Htop has many other user-friendly features that are not available under the top command
- In Htop, you can scroll vertically to see the full list of processes and horizontally to see the full command line.
- with Top because it doesn't wait to get data during startup.
- In Htop, you can kill multiple processes at once without inserting their PIDs.
- In Htop, you no longer need to enter a process number or priority value to re-optimize a process.
- Press "e" to print the process's environment variable set.
- Use the mouse to select list items.
2. Install Htop in Linux
This Htop package is mostly available in all modern Linux distributions and can be installed using the default package manager in the system.
Install Htop on Debian
$ sudo apt install htop
Install Htop on Ubuntu
$ sudo apt install htop
Install Htop on Linux Mint
$ sudo apt install htop
Install Htop on Fedora
$ sudo dnf install htop
Install Htop on CentOS 8/7
$ sudo yum install epel-release
$ sudo yum install htop
Install Htop on RHEL 8/7
--------- 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
Install Htop on Rocky Linux/AlmaLinux
$ sudo yum install epel-release
$ sudo yum install htop
Install Htop on Gentoo
$ emerge sys-process/htop
Install Htop on Arch Linux
$ pacman -S htop
Install Htop on OpenSUSE
$ sudo zypper install htop
On RHEL/CentOS and Fedora
$ sudo yum groupinstall "Development Tools"
$ sudo yum install ncurses ncurses-devel
on Debian, Ubuntu and Mint
$ sudo apt-get install build-essential
$ sudo apt-get install libncurses5-dev libncursesw5-dev
Next, download the latest Htop from the Github repository and run the Configure and Make scripts for installing and compiling Htop.
$ wget -O htop-3.0.5.tar.gz https://github.com/htop-dev/htop/archive/refs/tags/3.0.5.tar.gz
$ tar xvfvz htop-3.0.5.tar.gz
$ cd htop-3.0.5/
$ ./configure
$ make
$ sudo make install
3. How to use Htop
Now run the Htop monitoring tool by executing the following command on the terminal.
# htop
Htop has three main parts
1. Title, where we can see information such as CPU, Memory, Swap also shows tasks, load average and Up-time.
2. Sorted process list CPU utilization.
3. The footer displays different options, such as help, setup, filter tree kill, nice, quit, etc.
Press F2 or S for the setup menu > There are four columns, namely Setup, Left Column, Right Column and Available Meters.
You can configure the gauges that print at the top of the window, set various display options, choose among color modes, and choose which columns are printed in which order.
Type Tree or t to display the process tree view.
You can use this nifty Htop application to monitor Linux running processes by referring to the function keys shown in the footer.
However, it is recommended to use character keys or shortcut keys rather than function keys, as they may be mapped with some other function during the secure connection.