How To Install Htop In Linux? – Easy Guide
As a Linux user, I always search for better applications to increase my productivity, utilize my hardware efficiently, and monitor them to reduce any system crashes. Htop is one of them. It’s a command-line system monitoring tool for Linux based on ncurses. ncurses (new curses) is a programming library that allows the programmer to create a GUI-like CLI application using the API.
You can install Htop in Linux using the APT package manager in Debian or Ubuntu-based distributions. Also, you can use Pacman in Arch or Arch-based distributions. YUM, RPM, and DNF for RedHat-based Linux distributions. And from the software center of your Linux distribution. Or you can build it from the source. Let’s see how you can Install Htop in Linux.
What Is Htop?
Htop is a command-line utility to monitor system resources, view system processes, and manage them in real-time.
Htop is a newer and more advanced program compared to the Unix program called top. The top command has many limitations and does not provide enough information about the system processes. Htop has similar functionality as a top command but with greater flexibility and fewer limitations.
The top command only shows resource-consuming system processes whereas the htop shows all the running processes. Htop also offers mouse operations, colored output, process management, and visual indications for system resources like CPU, RAM, and SWAP.
Htop provides a list view and a tree view mode for better process management. You can search, filter, sort, and kill processes for better resource management. You can also customize the htop with more detailed info from the setup panel.
It’s a full-fledged system monitoring tool for Linux.
How To Install Htop In Linux?
Htop can be installed using the default package manager of your Linux distribution. Many Linux distributions come with htop pre-installed by default. It’s a common application and every Linux distribution has it in its respective repositories. You can install htop by using the following commands.
Install Htop On Ubuntu And Debian
If you are using Ubuntu or any Ubuntu-based distribution like Linux Mint, Zorin OS, Elementary OS, etc., or Debian, you can use the following command to install htop.
sudo apt install htop
Install Htop On Arch
Arch is completely different from Debian and Ubuntu. It’s a different base with a different package manager. You cannot apt-get software in Arch or any Arch-based distributions like Manjaro, XeroLinux, Garuda Linux, EndeavourOS, ArcoLinux, etc. Arch uses Pacman as the default Package Manager. To install htop on Arch, you need to execute the following command in the terminal.
sudo pacman -Syu sudo pacman -S htop
The first command will update the system and the second command will install htop.
Install Htop On Fedora
If you are using Fedora then the install command is different. Fedora uses the dnf package manager. To install htop in Fedora, type the following command in the terminal.
sudo dnf upgrade sudo dnf install htop
After that, you will find htop in the application menu.
Install Htop On CentOS 7/8
CentOS is a server-focused operating system and htop is a perfect application to monitor hardware resources and system processes. To install htop in CentOS, you need to enable the EPEL Repo first. Use the following command to activate the repo.
sudo yum install epel-release
Now use the following command to install htop using the yum package manager.
sudo yum install htop
You should see htop in the application menu or run it in the terminal.
Install Htop on OpenSUSE
OpenSUSE is one of the oldest Linux distributions. It uses Zypper Package Manager and RPM packages. To install htop in OpenSUSE, run the following command in the terminal.
sudo zypper install htop
This command will install htop on your system and you should see htop in the application menu.
How To Run Htop In Terminal?
Running the htop is a fairly easy process. After installing htop, you can find it in the application menu or you can run it in the terminal. To run htop in the terminal, use the following command.
htop
Htop has many other options that you can use. For example, if you use htop -C, it will start htop in the monochrome color scheme. Or if you want to check for the version, you can use htop -V. The following table will show you the available options that you can use in htop.
-C --no-color Use a monochrome color scheme -d --delay=DELAY Set the delay between updates, in tenths of seconds -F --filter=FILTER Show only the commands matching the given filter -h --help Print this help screen -H --highlight-changes[=DELAY] Highlight new and old processes -M --no-mouse Disable the mouse -p --pid=PID[,PID,PID...] Show only the given PIDs --readonly Disable all system and process changing features -s --sort-key=COLUMN Sort by COLUMN in list view (try --sort-key=help for a list) -t --tree Show the tree view (can be combined with -s) -u --user[=USERNAME] Show only processes for a given user (or $USER) -U --no-unicode Do not use unicode but plain ASCII -V --version Print version info --drop-capabilities[=off|basic|strict] Drop Linux capabilities when running as root off - do not drop any capabilities basic (default) - drop all capabilities not needed by htop strict - drop all capabilities except those needed for core functionality
Is Htop Better Than Top?
Long story short, the htop is better than the top. It has –
- Colorful interface
- Vertical and horizontal scrolling support
- Mouse support
- Full system process viewer
- Resource monitor
- Process tree view
- Options to customize
- and many more.
While top only offers a basic black and white text-based interface. It comes pre-installed on most of the major Linux distributions. It is old thus it is proven and tested. But it lacks far behind the htop. It does not support scrolling, has no mouse support, and is slow to load. Top offers some sorts of customizations but it is very limited.
Some prefer top over htop as it is a built-in tool and it gets the job done without installing another tool for the same purpose. But as time goes by, people are adopting htop over top because of its out-of-the-box configuration.
Conclusion
Thanks for reading this post. Now you can install htop on every mainstream Linux distribution. If you have any questions or you are facing any problems regarding this topic, feel free to comment down below. I would love to answer your questions. Until then, have a great day.