2 Easy ways to install the htop command in CentOS 7/8.

This is the Linux Basic Command tutorial to install htop command in CentOS 7/8.

htop command is to track the real-time processes. It is the same as the top command but it allows us to scroll up and down.

So with the help of htop command, you can track Memory Usage, CPU usage, CPU Process, and PID (Process ID).

Also, you can troubleshoot with the help of the htop command, What happens to the server? Hey! why it’s not working.


How to Install htop command in CentOS 7/8

So there is 2 ways to install htop in CentOS Linux,

  1. Install htop command with yum command.
  2. Install htop command with rpm command.

The below commands can executed to CentOS 7 and CentOS 8.

Install htop command with yum command in CentOS 7/8

First update the repository by yum update command.

$ sudo yum update

Now lets setup the epel-release repository in CentOS. So with the help of epel-release repository, we can setup htop command.

$ sudo yum install epel-release
$ sudo yum install htop

After the Installation just type the “htop” into the command line, BOOM!!! you will get the output.

$ htop
htop command in Linux explained CentOS 7 Ubuntu 18.

If you want to know the detail explanation of the htop command, then refer to the link.

Install htop command with rpm command in CentOS 7/8

So now lets install the htop command with the rpm package, first download the package of .RPM for htop with wget command.

$ wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/h/htop-2.2.0-3.el7.x86_64.rpm

Once the package will be downloaded then use the rpm command to install the htop command.

$ rpm -ivh htop-2.2.0-3.el7.x86_64.rpm
$ htop

htop command in Linux with examples.

Let’s see some of the examples for htop command in Linux.

Update the screen of htop every 3 seconds.

$ htop -d 30

Sort by user with htop command.

$ htop -s USER

Sort by CPU Usage with htop command.

$ htop -s CPU%

Track specific user using htop command.

$ htop -u tastethelinux

Sort by Memory Usage with htop command.

$ htop -s MEM%

Track multiple process using htop command.

$ htop -p 1,443

So 1 and 443 are the Process ID that will track.

There is an article, on the atop command in which you can also track Network.

Give your valuable time