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
Step 2
Enable the EPEL repository
This repository contains htop and other useful administration tools
sudo dnf install epel-release -y
Step 3
Install htop
sudo dnf install htop -y
Step 4
Launch htop
Run the command and view your system metrics in real time
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 epelIf EPEL is missing, enable it:
sudo dnf install epel-release -y
sudo dnf makecache
sudo dnf install htop -y2. 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 -yThen retry:
sudo dnf install htop -y3. Repository or Metadata Errors (e.g., 404, mirror failures)
Common messages
Failed to download metadata for repoCannot download repomd.xmlAll mirrors were tried
Cause
Network issues, DNS problems, or temporary mirror outages.
Fix
Verify network connectivity:
ping -c 3 8.8.8.8Refresh metadata and try another mirror:
sudo dnf clean all
sudo dnf makecache
sudo dnf install htop -yIf 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 -y5. 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 dnfIf necessary, repair the package manager:
sudo dnf reinstall dnf -y6. SELinux or Permission-Related Issues
Symptoms
Permission deniedwhen launchinghtop- Unexpected restrictions on process visibility
Cause
SELinux enforcing mode with custom policies.
Fix
Check SELinux status:
getenforceIf troubleshooting, temporarily set permissive mode:
sudo setenforce 0If 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 binThen run directly:
/usr/bin/htopIf needed, ensure /usr/bin is in your PATH:
echo $PATH8. 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 repolistIf htop is not yet available in EPEL for your release, you can temporarily use:
sudo dnf search htopOr 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 -yConclusion
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.
