Let's use Remote Desktop Connection command as example -- sudo dnf install gnome-remote-desktop.
In Linux, final usable software is called package.
Think Red Hat Package Manager (RPM) like an installer file, it contains all dependencies, script to install and configuration info.
dnf is a tool to run the installer (RPM).
You have to register subscription manager to access repository.
During the Step 2 Set Up RHEL >> Step 2.4 Set Up RHEL OS >> 1. Click Connect to Red Hat, is registration process.
Tutorial
Register subscription manager
subscription-manager register
Check status
subscription-manager status
Verify full access to repository or not
If it lists your Red Hat repositories (like rhel-10-baseos-rpms) without throwing any permission errors, your server is fully licensed, configured, and ready to go.
dnf repolist
After attaching subscriptions to a system, entitlement Certificates are created in /etc/pki/entitlement.
ls /etc/pki/entitlement
Check current entitlements
rct cat-cert /etc/pki/entitlement/[.pem file which not with -key].pem
Example: rct cat-cert /etc/pki/entitlement/3297449952593043403.pem
Solution
student@localhost:~$ sudo subscription-manager register
This system is already registered. Use --force to override
student@localhost:~$ sudo subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Registered
student@localhost:~$ sudo dnf repolist
Updating Subscription Management repositories.
repo id repo name
rhel-10-for-x86_64-appstream-rpms Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
rhel-10-for-x86_64-baseos-rpms Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)
student@localhost:~$ ls /etc/pki/entitlement
3297449952593043403-key.pem 3297449952593043403.pem
student@localhost:~$ rct cat-cert /etc/pki/entitlement/3297449952593043403.pem
Content:
Type: yum
Name: RHEL for SAP (for RHEL 7 Server) Extended Update Support (Debug RPMs)
Label: rhel-sap-for-rhel-7-server-eus-debug-rpms
Vendor: Red Hat
URL: /content/eus/rhel/server/7/$releasever/$basearch/sap/debug
GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Enabled: False
Expires: 86400
Required Tags: rhel-7-server
Arches: x86_64
Content:
Type: yum
Name: RHEL for SAP (for RHEL 7 Server) Extended Update Support (RPMs)
Label: rhel-sap-for-rhel-7-server-eus-rpms
Vendor: Red Hat
URL: /content/eus/rhel/server/7/$releasever/$basearch/sap/os
GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Enabled: False
Expires: 86400
Required Tags: rhel-7-server
Arches: x86_64
Scenario
In major enterprise settings—like banks, government systems, military networks, and medical facilities—servers are deliberately isolated from the outside internet for security.
This security practice is called Air-Gapping.
Companies do not want 5,000 corporate servers downloading the exact same update from the internet individually, wasting massive amounts of company network bandwidth.
Instead, they download the updates once to a central, local company server (internal YUM/DNF repository), and then configure all 5,000 servers to pull their software directly from that local repository.
Tutorial
Add the Repository URL
sudo dnf config-manager --add-repo="[Repository URL]"
Example: sudo dnf config-manager --add-repo="http://content.example.com/rhel10/x86_64/dvd/BaseOS"
Direct to repository directory
cd /etc/yum.repos.d/
List all content to check repository name
ls
Open repository configuration file
sudo vim /etc/yum.repos.d/[Repository name].repo
Example: sudo vim /etc/yum.repos.d/content.example.com_rhel10_x86_64_dvd_BaseOS.repo
Disable GPG Checking and change repository name
Sometimes the local software servers usually do not use security signatures (GPG keys).
If you don't turn off this check, DNF will refuse to install anything.
Press Esc --> I
Edit [Repository ID]. Exp: [content.example.com_rhel10_x86_64_dvd_BaseOS] to [exam-baseos]
Add/Edit line gpgcheck=0
Press Esc --> :wq --> Enter
Clear the Package Cache
sudo dnf clean all
Verify
sudo dnf repolist
[Cleanup] Delete the repository
rm -f [Repository name].repo
Example: rm -f content.example.com_rhel10_x86_64_dvd_BaseOS.repo
Solution
student@localhost:~$ sudo dnf config-manager --add-repo="http://content.example.com/rhel10/x86_64/dvd/BaseOS"
[sudo] password for student:
Updating Subscription Management repositories.
Adding repo from: http://content.example.com/rhel10/x86_64/dvd/BaseOS
student@localhost:~$ cd /etc/yum.repos.d/
student@localhost:/etc/yum.repos.d$ ls
content.example.com_rhel10_x86_64_dvd_BaseOS.repo redhat.repo
student@localhost:~$ sudo vim /etc/yum.repos.d/content.example.com_rhel10_x86_64_dvd_BaseOS.repo
student@localhost:~$ sudo dnf clean all
[sudo] password for student:
Updating Subscription Management repositories.
0 files removed
student@localhost:~$ sudo dnf repolist
Updating Subscription Management repositories.
repo id repo name
exam-baseos created by dnf config-manager from http://content.example.com/rhel10/x86_64/dvd/BaseOS
rhel-10-for-x86_64-appstream-rpms Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
rhel-10-for-x86_64-baseos-rpms Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)
student@localhost:/etc/yum.repos.d$ sudo rm -f content.example.com_rhel10_x86_64_dvd_BaseOS.repo
student@localhost:/etc/yum.repos.d$ ls
redhat.repo