Linux Uncategorized

Linux: htop Explained Visually

Google+ Pinterest LinkedIn Tumblr

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. In order to install htop type the following command in the Debian based OS.

sudo apt-get 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.

A picture takes from this video

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.

Thank you for being here and keep reading…

2 Comments

  1. 4 threads running on a 3 vcpu server ?
    That would deserve an explanation…
    Also, you said that htop is a more “interactive” than top. Maybe you should at least give some of the most interesting keys to use (al least the ? key for help).

    But thanks for theses visuals reminders. 🙂

    Another very, very good command for a system administrator who want to quickly see “Why it’s so slow”, is “glances”. It show far more informations than htop on the same screen (IO and network activity…), and can hilight the most urgent problem to solve on the system.

  2. Wow, your post is very helpful. I have learned a lot from this post.

Write A Comment