I. What is Htop?
Htop is a real-time process monitoring application that is interactive and designed for server systems such as Linux/Unix and is also a convenient alternative solution to commands.
top, is a default process monitoring tool built into all Linux operating systems.
Htop has many user-friendly features such as:
- In htop, you can scroll vertically to see the full process list and scroll horizontally to see the full command lines.
- Htop works very fast and it doesn’t need to wait to fetch data during boot.
- In short, you can disable multiple processes at once without inserting their PID.
- Use the “e” button to print the set of environment variables for a process.
- Use the mouse to select items in the menu list.
II. Install Htop on the Linux server
To install Htop on RHEL 8/7/6/5 and CentOS 8/7/6/5, your system must install and enable EPEL storage system, to do this, please run the following commands corresponding operating system you are using including 32bit and 64bit.
On RHEL/CentOS – HĐH 32-bit
-------------- For RHEL/CentOS 6 -------------- wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -ihv epel-release-6-8.noarch.rpm -------------- For RHEL/CentOS 5 -------------- wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -ihv epel-release-5-4.noarch.rpm
On RHEL/CentOS – HĐH 64-bit
-------------- For RHEL/CentOS 8 -------------- yum install epel-release -y dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -------------- For RHEL/CentOS 7 -------------- yum install epel-release -y -------------- For RHEL/CentOS 6 -------------- wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ihv epel-release-6-8.noarch.rpm -------------- For RHEL/CentOS 5 -------------- wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm rpm -ihv epel-release-5-4.noarch.rpm
Once the EPEL library has been installed, you can use the following yum command to fetch and install the htop package.
yum install htop -y
On Fedora OS
Fedora users can easily install htop using the Fedora Extras repository by typing:
yum install htop dnf install htop [Đối với Fedora 22+ releases]
On Debian and Ubuntu
In Debian and Ubuntu, you can install htop by typing:
apt-get install htop
III. Instructions to using htop
To use Htop, you just need to enter htop in the terminal interface.
Htop mainly has three main parts as follows:
- Header: we can see information like CPU, RAM Memory, Swap usage and also show tasks, Load Average and Server Uptime here.
- Body: List of processes sorted by CPU usage.
- Footer: Shows various options like help, setup, kill process, exit, etc.
If you want to see the tree of the list, you can click on Tree or t on the keyboard or simply press F5.
If you want to disable a process you just need to click on the process or use the up and down arrow keys and select the Kill button or use F9.
Shortcut keys and function keys Htop:
Some shortcuts and function keys that we use to interact with htop.
|Describe||Function keys||Shortcut keys|
|Inver Sort Order||F4||i|
|Nice – (Change Priority)||F7||[|
|Nice + (Change Priority)||F8||]|
Hopefully, this article will help you manage your Linux server more flexibly.
Wishing you success! See more useful articles about Linux VPS at the following link:
If you need assistance, you can contact support in the ways below: