Linux: How to install htop on Ubuntu and Mint
While top
the htop utility provides us with basic information about the processes running on our Linux system, the htop utility goes a step further and provides us with more information about the processes and also allows for several operations.
How to install htop on Linux?
To install htop
, sort the process list using the following criteria: CPU usage, memory, virtual memory, etc., and search for the process. Next, kill the process.
Automatic installation from repository
A package exists for most Linux distributions htop
, so it can be easily installed through your package manager! Here is the common procedure to use:
注意
: All commands are entered as root (admin) or we can use the sudo program to execute commands as root (Ubuntu/Kubuntu/Lubuntu/Xubuntu).
Installation on Debian, Ubuntu, Linux Mint and derivatives (Kubuntu, Lubuntu, Xubuntu, LMDE, etc.)
The first thing to do is to verify that our repository is up to date
$ apt-get update
The next step is to install htop
:
$ apt-get install -y htop
The above -y
parameters automatically accept package installation!
Fedora, CentOS, RedHat, etc.
For these distributions we will notice htop
that packages are often missing from the official repositories. Therefore it is necessary to use the "EPEL" repository:
Fedora
$ yum install htop
CentOS, RHEL, Scientific Linux, etc.
Install the EPEL repository:
$ yum install epel-release
If the "epel-release" package does not exist, you need to install it manually: RHEL/CentOS 7.X
$ rpm -ivh https://mir01.syntis.net/epel/7/$(arch)/e/epel-release-7-5.noarch.rpm
RHEL/CentOS 6.X
$ rpm -ivh http://fr2.rpmfind.net/linux/epel/6/$(arch)/epel-release-6-8.noarch.rpm
RHEL / CentOS 5.x
$ rpm -ivh http://mirror.in2p3.fr/pub/epel/5/$(arch)/epel-release-5-4.noarch.rpm
Installation htop
Package:
$ yum install htop
Gentoo
Just use emerge
to install the package.
$ emerge sys-process/htop
Manual installation from source
Manual installation from source may be necessary in the following cases:
-
htop
Package is not available for our system -
We want to run the latest version
htop
, but it is not available for our system yet.
htop
The installation and compilation should work on most systems
if we have the right tools ! We'll start by downloading the source:
$ wget http://hisham.hm/htop/releases/1.0.3/htop-1.0.3.tar.gz
We will then extract this package:
$ tar zxf htop-1.0.3.tar.gz
Now we will compile our tool:
$ cd htop-1.0.3
$ ./configure; make; make install
Start htop
Typically, if the installation is successful and returns an error message, run with the following command htop
:
$ htop
For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.
Related Articles
Switching PHP versions on Ubuntu
Publish Date:2025/04/13 Views:78 Category:PHP
-
Different tasks may require running multiple versions of PHP. You may need to switch PHP versions by running two sites on the same server or testing older versions of code using outdated methods. We can switch PHP versions on Ubuntu using t
Restart PostgreSQL in Ubuntu 18.04
Publish Date:2025/04/09 Views:72 Category:PostgreSQL
-
This short article shows how to restart PostgreSQL in Ubuntu. Restart PostgreSQL Server in Ubuntu You can restart Postgres server in Ubuntu using the following command. Order: sudo service postgres restart Sometimes the above command does n
Issues to note when installing Apache on Linux
Publish Date:2025/04/08 Views:78 Category:OPERATING SYSTEM
-
As the most commonly used web server, Apache can be used in most computer operating systems. As a free and open source Unix-like operating system, Linux and Apache are a golden pair. This article will introduce the installation and use of A
How to decompress x.tar.xz format files under Linux
Publish Date:2025/04/08 Views:186 Category:OPERATING SYSTEM
-
A lot of software found today is in the tar.xz format, which is a lossless data compression file format that uses the LZMA compression algorithm. Like gzip and bzip2, it supports multiple file compression, but the convention is not to compr
Summary of vim common commands
Publish Date:2025/04/08 Views:115 Category:OPERATING SYSTEM
-
In Linux, the best editor should be vim. However, the complex commands behind vim's powerful functions also make us daunted. Of course, these commands do not need to be memorized by rote. As long as you practice using vim more, you can reme
Detailed explanation of command return value $? in Linux
Publish Date:2025/04/08 Views:58 Category:OPERATING SYSTEM
-
? is a special variable. This variable represents the return value of the previous command. That is to say, when we run certain commands, these commands will return a code after running. Generally, if the command is successfully run, the re
Common judgment formulas for Linux script shell
Publish Date:2025/04/08 Views:159 Category:OPERATING SYSTEM
-
In shell script programming, predicates are often used. There are two ways to use predicates, one is to use test, and the other is to use []. Let's take a look at how to use these two methods through two simple examples. Example 1 # test –
Shell script programming practice - specify a directory to delete files
Publish Date:2025/04/08 Views:98 Category:OPERATING SYSTEM
-
Usually, in Linux system we need to frequently delete some temporary files or junk files. If we delete them one by one manually, it will be quite troublesome. I have also been learning shell script programming recently, so I tried to write
Use of Linux command at - set time to execute command only once
Publish Date:2025/04/08 Views:158 Category:OPERATING SYSTEM
-
This article mainly involves a knowledge point, which is the atd service. Similar to this service is the crond service. The functions of these two services can be similar to the two functional functions of javascript. Those who have learned