If you are a Windows user and are not used to the GNU/LINUX terminal, or if you are starting out in the world of Tux, you would be surprised at the many things that can be achieved by running commands from there.

Today we introduce you to HTOP, an interactive process viewer for Unix systems. It is a text-mode application (for console or X terminals) and requires ncurses. HTOP is also presented as a natural evolution of TOP (although its developments are totally independent), it has a better organization of information and thanks to its colors, we can easily observe every detail of the processes that are running at that time on our pc.

Installing HTOP in many  GNU/LINUX distributions

One of the biggest advantages of HTOP is that it is available through the official repositories for almost all GNU/LINUX distributions: it is only a single command away on the terminal to install it!! Although of course the command is defined by the distribution we are using.

Install HTOP on Debian, Ubuntu and ubuntu-based

Debian, Ubuntu and Ubuntu derivatives use apt as package manager, so the command to run with root privileges is as follows:

Or if the user has permission to use sudo, it can also be used:

Install HTOP on Fedora

Fedora uses the dnf package manager and therefore the command to install HTOP is the following, I remind you that you must have root privileges:

And after downloading, it will be installed.

Install HTOP on Gentoo

HTOP is also available from the Gentoo package manager called emerge. With root permissions we can use this command to install it:

Install HTOP on CentOS 7

CentOS 7 a free alternative to Red Hat Linux Enterprise, the process is a little more complicated than previous distributions but it’s no big deal.

Once logged in as root user, we proceed to download the package containing the EPEL repository:

downloading epel
downloading epel

Then we must install the downloaded.rpm package that will add the desired repository.

Installing EPEL
Installing EPEL

Later we verify that the repository is added correctly.

yum repolist
yum repolist

And if EPEL appears in the repository list, we did it correctly and it would already be added.

Now we proceed to install HTOP with the following command:

Installing HTOP CentOS 7
Installing HTOP CentOS 7

Now we have HTOP installed in our CentOS 7.

Using HTOP

HTOP as we saw it can be installed on various GNU/LINUX distributions but is also available for Unix and derivatives. For this article we will use HTOP installed on CentOS7.

The command that executes htop is htop 🙂 this command does not need to be executed as root user. Once the command is written and executed, htop will immediately appear in the open terminal session.

htop command
htop command


This is the screen that is displayed when you run htop. We can notice how it gives us information about CPU or ram memory usage, and the list of all processes running at the moment. However, if we are a little more observant, we will notice that, the HTOP command line interface can be divided into 3 big parts:

  • The first shows CPU usage with percentages, RAM and swap memory. On the right side of the header, displays the active tasks and more.
Htop - CPu usage, memory
CPu usage, memory
  • The second section or main header shows all the active processes of the system.
HTOP- list of process
HTOP- list of process

Each column represents an information or detail, in this header is where most of the HTOP possibilities take place. These are the columns with the information they show:

  • PID: Displays the process identifier number.
  • User: The user tells us that he has activated this process.
  • PRI: It shows the priority with which the process is executed.
  • NI: Shows the priority level
  • VIRT: The number of virtual memory used by the process.
  • RES: Used ram memory (Megabytes)
  • SHR: Shared memory used
  • S: Process status (Running, sleeping or zombie)
  • CPU%: percentage of CPU used by the process
  • MEM%: percentage of ram memory used by the process
  • TIME+: Active life-time of the process
  • Command: The command that executes the process.

As we can see, we have a lot of information available from HTOP.

The last “section” is intended for different actions that HTOP allows us to execute, for example, show help, kill processes, search, sort or exit.

actions of htop
actions of htop

Killing a process with HTOP

Of these options, we usually use more often that of killing a process. To kill a process we must first use the arrow keys to navigate from top to bottom to position ourselves in the process to be killed, then press the F9 key, and then move with the keyboard to option 9:

killing a process
Killing a process

And by pressing the F5 key we can switch between the sorted or tree-shaped view:

Tree view HTOP
Tree view HTOP

Conclusively, HTOP is a great application executed on the terminal to monitor processes within our Unix-based operating system. Its installation process is quite simple and this is reflected in the large number of GNU/LINUX distributions that have it within their main repositories.

Feel free to share this article on social networks. A lot of people could use it.

Spread the love

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.


Please enter your comment!
Please enter your name here