How to Attach Free Subscription to RHEL 9 System

In this post, we will cover how to attach free subscription to RHEL 9 system.

Red Hat Enterprise Linux (RHEL) is a popular and reliable operating system for enterprise-level computing. However, to fully benefit from its features and receive technical support, it is important to attach a valid subscription to your installation.

Before we begin, it’s important to note that a free subscription is not available for commercial use. If you plan to use RHEL for commercial purposes, you must purchase a paid subscription

1) Register for a Red Hat Developer account

The first step to attaching a subscription to RHEL 9 is to register for a Red Hat Developer account. This is a free account that provides access to many of Red Hat’s development tools and resources, including subscriptions to certain Red Hat products. To register, simply go to https://developers.redhat.com/register and follow the instructions to create an account.

2 ) Attach the Subscription

There are two ways to attach subscription to your RHEL 9 system either from Command Line or from Desktop environment (GUI). In post, we will discuss the command line method.

To attach subscription from command line, run following subscription-manager command

$ sudo subscription-manager register --username [Red Hat Developer account username] --password [Red Hat Developer account password] --auto-attach

Example:

$ sudo subscription-manager register --username pradeepantil@gmail.com --password xxxxxxxx --auto-attach

Output,

Subcription-Manager-Command-RHEL9

This command will automatically attach a free Developer Subscription to your RHEL 9 system. You can verify that the subscription is attached by running the following command:

$ sudo subscription-manager list --available

Subscription-Details-RHEL9

Note: If your RHEL 9 system is behind the proxy server then subscription-manager can be configured to use a proxy in several ways,

  • via standard HTTP_PROXY , HTTPS_PROXY , NO_PROXY environment variables (environment-level settings)
  • via options in /etc/rhsm/rhsm.conf (application-level settings)
  • via command-line arguments (command-level overrides)

3) Test and Validate Subscription

Run below dnf command to list repo enabled after attaching the subsctiion,

$ sudo dnf repolist

DNF-Repolist-RHEL9

Above output shows that RHEL 9 AppStream and BaseOS repository are enabled. Now, test these repositories by installing nginx web server package, run

$ sudo dnf install nginx -y

dnf-install-nginx-rhel9

Perfect above output confirms that we are able install packages using repositories which are enabled after attaching the subscription.

Removing Subscription

To remove subscription, run following command,

$ sudo subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
$

That’s all from this post, I hope you have found it informative. Kindly do post you queries and feedback in below comments section.

Also Read: How to Download RPM Packages Without Installing on RHEL 8

Leave a Comment

four + two =