Subscribe to How-To Geek

Using htop to Monitor System Processes on Linux

Most people familiar with Linux have used the top command line utility to see what process is taking the most CPU or memory. There's a similar utility called htop that is much easier to use for normal tasks.

The first great thing about htop is that it will show you your usage per CPU, as well as a meaningful text graph of your memory and swap usage right at the top. I find this much easier to understand at a glance than the default output from top.

Installing htop on Ubuntu

Installing on Ubuntu is as simple as apt-get… You can also grab the source from the htop site linked at the bottom of this article.

sudo apt-get install htop

Once installed, just type htop at a terminal to launch it, and notice the great text-mode graph at the top of the display:

image

But here's the best part… just use your Up/Down arrow keys to select a process, and then you can kill it with the F9 key if you'd like, or you can change the priority by using the F7 and F8 keys. (note that you'll have to be root to give anything really high priority).

image

You can also use the F6 key to change the default sort column really easily:

image

You can check the setup options for a lot more settings like which columns should show up by default.

htop - process viewer for linux

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 07/10/07 and tagged with: Ubuntu

Comments (7)

  1. FrontBumLover

    Mmmhmm, looks nice.. now to port it to freebsd.

  2. Anonymous

    What KDE theme are you using in those screenshots?

  3. The Geek

    It's the default one that comes with Kubuntu, actually… it's called Crystal

  4. The Geek

    I'm pretty sure it will compile fine on FreeBSD….

  5. FrankX

    I am sure you missed the word "Install" out of the Ubuntu command to install Htop.

    Think it should be…

    sudo apt-get install htop

    ;o) All the best!

    FrankX

  6. The Geek

    FrankX,

    Thanks for noticing that! That's gotta be the 10th time I've forgotten the word install when typing apt-get. =)

  7. freebsd

    Yes, this should work.


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
Popular Articles

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.