How to Install Htop on Rocky Linux EL9/EL8 (Fast & Reliable)
Want to install htop on Rocky Linux 8 or 9? This quick guide shows you the exact commands and why they matter so your system stays tidy, not bloated.
Why You Need Htop
Htop is a live‑process viewer that replaces the bland top command with colors, tree views, and kill buttons. I’ve seen people stare at top for hours trying to spot a runaway process—htop makes it instant. If you ever run “ps aux” and get lost in a sea of numbers, htop is the rescue tool you didn’t know you needed.
Prerequisites & Repository Setup
Before anything else, make sure your system’s package cache is fresh. Rocky Linux 8 ships with dnf, but it won’t find htop until the EPEL (Extra Packages for Enterprise Linux) repository is enabled.
sudo dnf install -y epel-release
- Why this matters: EPEL contains community‑maintained packages not in the base repo. Without it, dnf will complain “No match for argument: htop.”
- If you’re on EL9 and find the command fails, double‑check that you typed epel-release correctly; a typo means you’ll never hit the right repository.
Installing Htop via DNF
With EPEL enabled, installing is one line:
sudo dnf install -y htop
- Why the -y flag? It auto‑answers “yes” to any prompts. If you’re in a script or just want to save time, this keeps the flow uninterrupted.
- If you get a message about missing dependencies, DNF will list them and resolve automatically—no manual juggling required.
Verifying the Installation
Run htop to confirm it launches:
htop
You should see a green‑and‑blue UI with CPU cores, memory usage, and a sortable process list. Press F10 or Ctrl‑C to exit. If nothing appears, double‑check that the binary is in /usr/bin/. You can confirm its presence:
which htop
- A missing path means the install didn’t finish; rerun the DNF command.
Common Pitfalls & Quick Fixes
- EPEL isn’t loading: On EL9, sometimes you need to clear the metadata cache first. Run sudo dnf clean all then try installing again.
- Old htop version: If you previously installed from a third‑party repo and it’s stuck at an old release, remove it (sudo dnf remove htop) before reinstalling via EPEL.
- Permission errors: Htop runs as your user by default. If you get “permission denied,” ensure you’re not trying to launch it with sudo unless you truly need root privileges; otherwise just run the plain command.
That’s all there is to it—no extra fluff, no hidden steps. You now have a powerful monitoring tool on both Rocky Linux 8 and 9 without bloating your system or breaking anything else.