Install htop in RHEL, CentOS and Fedora linux

Photo of author

By rasho

Htop is an interactive and real-time system-monitor process-viewer written for Linux. It is designed to replace the Unix program top. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. Htop uses color and gives visual information about processor, swap and memory status.[more info]

Comparison between htop and top

  • In ‘htop’ you can scroll the list vertically and horizontally to see all processes and complete command lines.
  • In ‘top’ you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).
  • ‘htop’ starts faster (‘top’ seems to collect data for a while before displaying anything).
  • In ‘htop’ you don’t need to type the process number to kill a process, in ‘top’ you do.
  • In ‘htop’ you don’t need to type the process number or the priority value to renice a process, in ‘top’ you do.
  • ‘htop’ supports mouse operation, ‘top’ doesn’t
  • ‘top’ is older, hence, more used and tested.

More information on http://htop.sourceforge.net/

Install htop on RHEL/CentOS 5.x/6.x, Fedora 12/13/14/15/16/17/18/19/20

On RHEL, CentOS, the htop tool is not available in the yum repository by default. Therefore, we enable RPMForge Repository. After enabling RPMForge repository install htop using yum command:

# yum install htop

Install htop from source code

If you prefer to install htop from souce, download the source code and compile it:

# wget http://downloads.sourceforge.net/project/htop/htop/1.0.2/htop-1.0.2.tar.gz
# tar -xvf htop-1.0.2.tar.gz
# cd htop-1.0.2
# ./configure
# make
# make install

How to use htop command

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

# htop
Htop (Linux Process Monitoring)
Htop (Linux Process Monitoring)

Press “F2″ or “S” to see htop setup menu:
[ads]

Htop Process Viewer Meter
Htop Process Viewer Meter

If you want to see process list on tree view press “F5″ or “t”

Display Processes in Tree View
Display Processes in Tree View

Change the Output Refresh Interval

To change the refresh interval of the htop output, use the -d command line option. “htop -d x”. Where x is referred in thenths of seconds.

# htop -d 10

Htop Shortcut and Function Keys
In next table view shortcut and function keys for htop monitoring tool:

Htop Shortcut and Function Keys
Htop Shortcut and Function Keys

Leave a Comment