Htop is an interactive process viewer, a system-monitoring tool for Linux/Unix system. It is an optimized version of Linux top command. Using Htop you can find better results. Htop also supports mouse events to select any process with the mouse. Htop provides a more user-friendly and readable view of CPU, Memory, Load uses on the head.
You may like:
Htop 2.1 is available with cross-platform features. Now, this release includes code supporting Linux, FreeBSD, OpenBSD and Mac OS X.
Step 1 – Htop Installation
Htop is available under default package repositories. Use one of the following commands to install Htop on your system.
Using Package Manager
sudo apt install htop
# For Debian Based Systems
sudo yum install htop
# For RedHat Based Systems
The package manager may not have the updated version. Also, it may not available under package manage. In that case, the installation will fail. Download the source code of Htop and compile it on your system.
Using Source Code
tar xzf htop-2.1.0.tar.gz
sudo make && sudo make install
Step 2 – Using Htop
The htop installation has been completed. Now just type htop on the terminal and watch the results. Press Q or F10 to exit from htop command. The bottom line will show you the commands to set up the display, search, sort, increase/decrease the nice value, kill process etc.
The htop provides shortcuts to filter the results for you. Use the following shortcuts keys to change the view of htop output.
- F2 => Setup
- F3 or / => Incremental name search
- F4 or \ => Incremental name filter
- F5 or t => Tree view
- F6 + – => Exapand/collaps tree
- F7 => Decrease nice value
- F8 => Increase nice value
- F9 => Kill selected process
- F10 => Exit from Htop command
- P => Sort by CPU
- M => Sort by Memory
- T => Sort by time