= How to add EPEL to RHEL or CentOS 9

For a Linux user, a software repository (a "repo" for short) is the quickest and easiest way to discover and install new applications.
Linux projects like Fedora tend to have vast repositories, because part of the value of a community-supported distribution is the ability and willingness to test up-and-coming application releases.
RHEL, which is usually used for its reliability and stability, tends to be strict about what makes it into its repositories, because quality is paramount.
If your RHEL server is running mission-critical applications, then using tried and tested software from official repositories is a valuable strategy.
However, there's more software out there than what's in the official repositories and sometimes it's useful to have access to a wider range of choice, especially during development, testing, and just general everyday use.

== What is EPEL

Extra Packages for Enterprise Linux (EPEL) is a repository maintained by https://docs.fedoraproject.org/en-US/epel/[Fedora packagers] for use with CentOS and RHEL.
It's an admittedly odd assortment of packages, probably mostly based on what other CentOS and RHEL admins happen to be using themselves.
Personally, I find it indispensible, whether it's because I want to install the excellent `inxi` command or the entire KDE Plasma Desktop.

== Install EPEL in 3 easy steps

1. First, enable the https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/package_manifest/codereadylinuxbuilder-repository[CodeReady Linux Builder repository]. You already have access to it, you just need to enable it.
+
On CentOS:
+
[source,bash]
----
$ sudo dnf config-manager --set-enabled crb
----
+
On RHEL:
+
[source,bash]
----
$ sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
----

2. Next, install the EPEL RPM.
+
On CentOS:
+
[source,bash]
----
$ sudo dnf install epel-release epel-next-release
----
+
On RHEL:
+
[source,bash]
----
$ sudo dnf install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
----

3. That's it! There isn't actually a third step, so now you can install software from EPEL. For example, here's how to install `inxi`, a handy command to gather system stats:
+
[source,bash]
----
$ sudo dnf install inxi
----

== EPEL for better living

The EPEL repository is a great convenience repo to help you get the software you may not necessarily need, but definitely want.
The first thing I installed on my RHEL laptop was EPEL, and I love the applications it makes available to me.
Try EPEL out, and if you package applications yourself, consider contributing to the repository so others can benefit from your hard work!