[Solved] Error: Unable to find a match: htop CentOS 8

If you are trying to install htop on CentOS 8 by using the command

sudo yum install htop

and getting this error

Error: Unable to find a match: htop

Unable_to_find_a_match_htop

This is because the correct repository is not added to your system.

htop is part of EPEL release so you will need to enable it.

To fix this follow these simple 2 steps:

Step 1: Add EPEL repository

sudo yum install epel-release

Press ‘y’ key and then enter when asked

You will see a screen like this

adding_EPEL

Step 2: Install htop

Run the command to install htop

sudo yum install htop

This will first update the index and then download and install htop.

installing_htop

If everything goes well you will have a working htop.

You can run htop by using the command

htop

you will see something like this

htop_running_centos8

If you face any problem let me know in the comment below.