1. Get centos release and osrelease. You can install htop on Centos 8 Linux and Centos 8 Stream.
cat /etc/centos-release
cat /etc/os-release
2. Install EPEL in the Centos server.
If you get the error, Failed to Download Metadata for Repo AppStream. Let’s fix it following this post.
sudo dnf install -y epel-release
sudo dnf repolist
[root@centos8 ~]# sudo dnf install -y epel-release
stLast metadata expiration check: 8:08:19 ago on Sun 09 Oct 2022 10:57:59 PM +07.
Package epel-release-8-17.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@centos8 ~]# sudo dnf repolist
repo id repo name
appstream CentOS Stream 8 - AppStream
baseos CentOS Stream 8 - BaseOS
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
extras CentOS Stream 8 - Extras
extras-common CentOS Stream 8 - Extras common packages
3. Get the information of htop package then install htop on a Centos 8 server.
sudo dnf info htop
sudo dnf install -y htop
[root@centos8 ~]# sudo dnf info htop
Last metadata expiration check: 8:09:45 ago on Sun 09 Oct 2022 10:57:59 PM +07.
Available Packages
Name : htop
Version : 3.2.1
Release : 1.el8
Architecture : x86_64
Size : 170 k
Source : htop-3.2.1-1.el8.src.rpm
Repository : epel
Summary : Interactive process viewer
URL : http://hisham.hm/htop/
License : GPLv2+
Description : htop is an interactive text-mode process viewer for Linux, similar to
: top(1).
[root@centos8 ~]# sudo dnf install -y htop
Last metadata expiration check: 8:09:49 ago on Sun 09 Oct 2022 10:57:59 PM +07.
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Installing:
htop x86_64 3.2.1-1.el8 epel 170 k
Transaction Summary
========================================================================================================================
Install 1 Package
Total download size: 170 k
Installed size: 396 k
Downloading Packages:
htop-3.2.1-1.el8.x86_64.rpm 135 kB/s | 170 kB 00:01
------------------------------------------------------------------------------------------------------------------------
Total 115 kB/s | 170 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : htop-3.2.1-1.el8.x86_64 1/1
Running scriptlet: htop-3.2.1-1.el8.x86_64 1/1
Verifying : htop-3.2.1-1.el8.x86_64 1/1
Installed:
htop-3.2.1-1.el8.x86_64
Complete!
Run htop, type htop then hit Enter.
htop
ADVERTISEMENT
5/5 - (1 vote)