Installing htop on Linux
Savvy Linux users are probably familiar with ‘top’, a simple process monitoring program which runs in command line. If you are one such Linux user, you might be interested in the prospect of using a more colourful and interesting UI, which the ‘htop’ offers.
This screenshot of htop will give you an idea of what it looks like:
Benefits of Using htop:
- Colour meters – displays CPU load, memory usage, etc., so you can easily see if they are within standard levels
- User interaction supported – user can utilise both mouse and keyboard
- Sort process list – by CPU%, MEM%, time running, etc., in either ascending or descending sequence
- Fully customisable – depending on your requirements
- Help menu – lists all possible commands which is helpful if you are a beginner
How to Install:
It’s important to install Repoforge (previously known as RPMForge) before installing htop. Repoforge will act as a repository from which the files can be pulled.
RHEL, CentOS & Fedora (32-bit)
- RHEL 5, CentOS 5 & Fedora
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uhv rpmforge-release*.rf.i386.rpm
- RHEL 6, CentOS 6
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpm -ihv rpmforge-release*.rf.i686.rpm
RHEL, CentOS & Fedora (64-bit)
- RHEL 5, CentOS 5 & Fedora
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release*.rf.x86_64.rpm
- RHEL 6 & CentOS 6
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ihv rpmforge-release*.rf.x86_64.rpm
Installing htop
- After installing Repoforge, install htop by executing this command:
yum install htop
- Run htop by executing this command:
htop
Debian
It is even simpler to install htop on Debian because it is already available in the repositories:
- Open an SSH session.
- Log in using your root user login credentials.
- Type “apt-get install htop”.
- Run htop by typing “htop”.
- Press F10 if you want to quit htop at any time.
WHM/cPanel Users:
Enabling additional repositories on servers with WHM/cPanel can cause issues so this is not recommended. Alternately, you can use wget to get the RPM from http://pkgs.repoforge.org/htop/. Afterwards, use the rpm i-command.
You can find more information on htop here.