Install htop as a top Alternative

htop, an interactive process viewer for Linux. It is a text-mode application (for console or X terminals). It is a powerful alternative to using the top command.

Here is a little script to install htop, which can easily be applied to any number of other simple installs too.

#!/bin/bash
cd /opt
# Download and install
if [ $(arch) = "i686" ]; then
# 32-bit
yum install -y http://pkgs.repoforge.org/htop/htop-1.0.3-1.el6.rf.i686.rpm
else
# 64-bit
yum install -y http://pkgs.repoforge.org/htop/htop-1.0.3-1.el6.rf.x86_64.rpm
fi

After creating the script and making it an executable, run the script to install htop particular to your architecture, 32 or 64 bit. Here is a screenshot of the script in action on a CentOS 6.7 (64-bit) machine.

htop-install

Upon completion, type htop to run. There are so many options available, which are explained using the man pages for htop with man htop.

htop-u-root