Let’s get this straight: most people familiar with Linux and maybe used the top command-line utility to see what process is taking the most CPU or memory. There’s a similar command-line utility called htop that is much interactive than the top.
It’s one of my favorite Linux tools that I use regularly to monitor system resources. Most people argue on why someone uses htop when we have built-in top. I mean it’s like you have the weapon to kill the zombies with Bazooka but instead, you’re killing them with the knife.
htop has better
human-readable defaults. Sure, others can do the same thing, but I just
want to quickly run it — not configure it first.
Htop has an awesome visual interface that we can also interact with using our keyboard. The screen packs a lot of information which can be daunting to look at. It allows us to scroll vertically and horizontally, so we can see all the process running on the system, along with their full command line.
The htop command is not built-in so first we need to install it.
sudo apt-get install htop -y
sudo yum install htop -y
Once installed, just type htop at the terminal. Here’s what htop looks like when you first run it.
I know, I know, there’s a lot of output to digest. That’s why I have found a couple of pictures for the lower and upper sections.
Let’s first start with the upper section first.
Now I think there’s nothing left for me to explain everything is self-explanatory in the picture.
And here’s the lower section of htop.
This brings an end to this explanation of the htop command. In case you wanna see the discussion on htop vs top here is the link.
source : https://ahsensaeed.com/linux-htop-explained-visually/