htop is free and open-source software that helps the user in viewing the running process and monitoring the consumption of system resources. Here we learn the commands to install htop viewer on Ubuntu 22.04 Jammy JellyFish or Ubuntu 20.04 LTS Focal Fossa.
Get a dynamic overview of your running processes and the system resources using htop. Well, that can be done with the classic command-top
but compared to that this process manager offers some comfort functions and ncurses interface and can be operated easily with the keyboard without having to type long commands. If htop is started in a terminal within a desktop environment, the mouse can also be used. If you want to use the mouse in a virtual terminal, gpm must be installed.
The program also offers a freely configurable bar in the upper part of the display. Graphs for the system resources and various other information can be output there.
Step to Install Htop Viewer on Ubuntu 22.04 LTS
1. Requirments
• Ubuntu Linux
• A non-root user with sudo rights at least
• Internet Connection
2. Run Apt update
Let’s start by running the system update command to install the available updates for our Ubuntu along with refreshing of repository cache. Although, it is not necessary, if you have not done this for a while then it is recommended.
sudo apt update && sudo apt upgrade
3. Install htop viewer on Ubuntu 22.04 | 20.04
Just like the Top tool that is available through the default system repository of Ubuntu, htop can also get from the base repo. Hence, we don’t need to add any third-party repository, just use the APT package manager command given below and you are done.
sudo apt install htop
4. Command to Check htop version & options
There are many options available to use with htop to see what are those along with the details of the current installed hTop version, here are the commands:
htop --version
htop -help
All the options or arguments we can use with this command-line tool will appear along with the detail of the current version.
5. Start using hTop command tool on Ubuntu
To start this tool we just need to open the command terminal and then run:
htop
This will open the interface of the tool where you can have a glance at the current process and system resources.
6. Keyboard Shortcuts
There are a few common keyboard shortcuts we can use to manage htop, here are those:
F1 for Help: When we press the F1 key, it opens a brief htop help page. In particular, the various key combinations that can be used to operate htop are described here.
F2 for Setup: Htop can be adjusted very extensively. The adjustments range from changing the color scheme to completely rebuilding the individual areas. For example, an average display can be displayed in the upper area instead of the utilization of the individual CPU cores, or the current time or the hostname can be displayed. The columns in the middle area can be completely restructured. For example, the read and write rate can be displayed on the data carrier. The design of the ads can also be changed.
F3 for Search: F3 can be used to search htop for user names, process names, etc.
F4 for Filter: The display can be filtered so that processes that are not relevant are hidden.
F5 for Tree: A process tree is displayed instead of a single line per process. This shows which processes build on each other.
F6 to Sort: The display can be sorted according to individual columns. For example, according to CPU utilization, memory consumption, or I/O.
F7: The nice value can be decreased to give the process a higher priority (only root can increase the process priority)
F8 – Nice+: Increases the Nice value, thereby decreasing the process priority. This can be done by any user.
F9 – Kill: This shows a list of signals that can be sent to the process. SIGTERM is selected by default for graceful termination of processes.
7. Uninstall or Remove htop from Ubuntu 22.04 | 20.04
Well, although it is not a heavy resource-consuming application, however, in case you want to remove it from your system, then again use Apt package manager.
sudo apt remove htop -y
In this way, we can use this command line processor monitoring tool – htop on Ubuntu 22.04 or 20.04. However, it is not the only one. There are many other open-source applications with better Interface and management, especially for those who are using the graphical user interface on Ubuntu.
Here are some to refer to:
• Install Bpytop as an alternative to Top & Htop- System Monitor
• 5 Best htop alternatives to monitor Linux systems