A tutorial on installing htop on CentOS 8


If you want to monitor your system interactively, the htop command should be one of the best choices. Htop is an improvement of its predecessor, the top command. It is an interactive process viewer and system monitor. It colors resource usage indicators and enables you to easily master system performance.
It displays information about CPU and ram utilization, tasks in progress, average load, and uptime. In addition, htop displays a list of all running processes and can also display them in a tree format.

The advantages of htop over top include

  • Output resource usage statistics in color.
  • The ability to terminate or terminate a process without typing its PID.
  • Htop allows the use of a mouse, while top does not.
  • Better performance than the top command.

Now let’s take a look at how to install this convenience feature.

Installing htop on CentOS 8

By default, htop is pre installed on centos8. However, if the tool is missing on your system, the installation process is simple and takes only three steps.

1. The first step to install the htop tool is to enable the EPEL repository. To do this, run:

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

After installing the EPEL repository, please update the system.

# dnf update

2. To install the htop tool, simply run the following command:

# dnf install htop

After the installation is complete, you can find out more about htop by running the command.

# dnf info htop

3. To start htop, just run the command.

# htop

The left part, from top to bottom, shows the usage of CPU, memory and swap partition, and the right part shows: tasks is the total number of processes, the number of currently running processes, load average is the average load of 1 minute, 5 minutes, 10 minutes of the system, and uptime is the running time of the system.

The above items are as follows:

  • PID: identification number carried out
  • User: the user running the process
  • Pri: the priority of the process
  • Ni: the priority value of the process. The default value is 0, which can be adjusted
  • Virt: virtual memory value occupied by process
  • Res: the value of physical memory occupied by the process
  • SHR: shared memory value occupied by process
  • S: The running status of the process, R is running, s is sleeping, waiting to wake up, Z is deadlock
  • %CPU: the CPU usage of the process
  • %MEM: the percentage of physical memory and total memory occupied by the process
  • Time +: the total CPU time consumed by the process after starting
  • Command: the name of the start command for the process to start

In addition, you can pass some parameters to the command. For example, list the user’s processes. Suppose linuxidc runs the command.

# htop -u linuxidc

For help with command usage, just run.

# htop --help

Alternatively, you can view the man page by running the following command:

# man htop


In this article, you learned how to install htop on CentOS 8 and how to use the command to retrieve system statistics.

The above is the tutorial of installing htop on CentOS 8. I hope it will be helpful for you. If you have any questions, please leave me a message, and the editor will reply to you in time. Thank you very much for your support to the developeppaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Recommended Today

Web authentication and API using token

First of all, I’ll post the article I’ve read:1.http://www.cnblogs.com/xiekel…2.http://blog.leapoahead.com/20…3.http://blog.leapoahead.com/20…4.jwt demo :https://github.com/bigmeow/JWTFive https://github.com/jwtk/jjwt There are several good ones here, which are officially recommendedSix http://blog.csdn.net/koastal/… Anti replay attack scheme based on timestamp and nonce The company’s current web design is based on HTTP basic auth, and has always felt that there will be great security problems, and […]