How to Install htop on AlmaLinux 10

Overview

htop is a powerful system monitoring tool for analyzing CPU usage, memory consumption, running processes, and system load. AlmaLinux 10 does not include htop in its default repositories. The installation requires enabling the Extra Packages for Enterprise Linux repository known as EPEL.

Step 1

Update your system packages to ensure the latest repository information

sudo dnf update -y
Almalinux dnf update result

Step 2

Enable the EPEL repository
This repository contains htop and other useful administration tools

sudo dnf install epel-release -y
Almalinux 10 install epel-release

Step 3

Install htop

sudo dnf install htop -y
Almalinux install htop

Step 4

Launch htop
Run the command and view your system metrics in real time

htop
Almalinux htop

Why htop improves system administration in AlmaLinux

  • It displays an interactive process list with color-coded usage details
  • It provides fast sorting and filtering options
  • It allows managing processes without leaving the interface

Troubleshooting

Common Errors and How to Fix Them

Even though installing htop is straightforward, users often encounter issues related to repositories, networking, or package conflicts. Below are the most common errors and their fixes.


1. No match for argument: htop

Cause
The EPEL repository is not enabled, or repository metadata is stale.

Fix

sudo dnf repolist | grep epel

If EPEL is missing, enable it:

sudo dnf install epel-release -y
sudo dnf makecache
sudo dnf install htop -y

2. Error: Unable to find a match: epel-release

Cause
The EPEL package is not available because CRB (CodeReady Builder) is disabled, which EPEL depends on in RHEL-compatible distributions.

Fix
Enable CRB first:

sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release -y

Then retry:

sudo dnf install htop -y

3. Repository or Metadata Errors (e.g., 404, mirror failures)

Common messages

  • Failed to download metadata for repo
  • Cannot download repomd.xml
  • All mirrors were tried

Cause
Network issues, DNS problems, or temporary mirror outages.

Fix
Verify network connectivity:

ping -c 3 8.8.8.8

Refresh metadata and try another mirror:

sudo dnf clean all
sudo dnf makecache
sudo dnf install htop -y

If DNS is misconfigured, check /etc/resolv.conf and ensure valid name servers are present.


4. GPG Key Verification Failed

Common message

  • Public key for epel-release is not installed

Cause
The EPEL GPG key was not imported correctly.

Fix
Reinstall the EPEL release package and re-import keys:

sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-*
sudo dnf reinstall epel-release -y
sudo dnf install htop -y

5. dnf Command Not Found or Not Working Properly

Cause
The system is minimal or the package manager environment is broken.

Fix
Ensure dnf is installed and functional:

which dnf
sudo rpm -q dnf

If necessary, repair the package manager:

sudo dnf reinstall dnf -y

6. SELinux or Permission-Related Issues

Symptoms

  • Permission denied when launching htop
  • Unexpected restrictions on process visibility

Cause
SELinux enforcing mode with custom policies.

Fix
Check SELinux status:

getenforce

If troubleshooting, temporarily set permissive mode:

sudo setenforce 0

If the issue disappears, adjust SELinux policies instead of leaving permissive mode enabled in production.


7. htop Installed but Command Not Found

Cause
The binary is installed in a path not included in $PATH (rare, but possible in custom environments).

Fix
Locate the binary:

sudo rpm -ql htop | grep bin

Then run directly:

/usr/bin/htop

If needed, ensure /usr/bin is in your PATH:

echo $PATH

8. Version or Compatibility Issues on AlmaLinux 10

Cause
EPEL packages may lag behind or temporarily be unavailable for newly released major versions.

Fix
Verify EPEL for AlmaLinux 10 is enabled and supported:

sudo dnf repolist

If htop is not yet available in EPEL for your release, you can temporarily use:

sudo dnf search htop

Or build from source as a last resort (not recommended for production systems unless required).


Diagnostic Checklist (Quick)

Before retrying installation:

sudo dnf update -y
sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release -y
sudo dnf makecache
sudo dnf install htop -y

Conclusion

Installing htop on AlmaLinux 10 requires enabling the EPEL repository. After that, the installation finishes quickly and gives you a reliable system monitoring tool. You now have a better way to watch system resources and keep AlmaLinux running smoothly.

Stay in the Loop

Get the daily email from ScoHostings that makes reading the news actually enjoyable. Join our mailing list to stay in the loop to stay informed, for free.

Latest stories

You might also like...