top
is very popular and well known system monitoring tool provided by default by most of the Linux distributions. htop
is more eye candy and more professional system monitor tool which is provided by most of the Linux distributions. In this tutorial we will look how to install and use htop
command to monitor cpu, memory etc.
Linux Top – Monitor Linux System Resources Cpu, Memory, Network
We can use mouse even htop
is an console application because it supports extended console features. We can select menu and processes with mouse pointer.
Install For Ubuntu, Debian, Kali, Mint
htop
is very lightweight tool and installed with apt
package manager.
$ sudo apt install htop
Install For Fedora, CentOS, RHEL
We can install with yum
like below. We can also prefer dnf
for Fedora.
$ sudo yum install htop
Run htop
We can run htop from command line just like below. This will start a screen where CPU cores and their load are graphically presented and the list of the process listed according to CPU usage.

List Processes As Tree
As Linux processes will have some hierarchy which creates child and parent relationship between processes. We can show this relationship in a tree form with F5
key.

Filter Processes
We can filter processes according to their name, path and related options. We can set filter with F4
command. In this example we will only list process those have /usr/bin
path and filter.

Kill Process
We can also kill selected process with F9
key. This will show a signal list like below. We can select the signal we want to send to the process which is SIGTERM
by default. Keep in mind that we also need privileges to kill selected process.

We can cancel the kill operation with Esc
key.
Customize htop Screen
We have the ability to customize htop
screen. We can select which statistics will be shown in Left Column
, Rigth Column
and Colors. We will use F2
key for this operation.