Register RHEL with Subscription Manager

Tested on RHEL 10.2 (Coughlan)
Package subscription-manager 1.30.12-1.el10
python3-subscription-manager-rhsm 1.30.12-1.el10
Applies to RHEL
Privilege sudo or root
Scope Register and unregister with subscription-manager, check registration status under Simple Content Access, refresh subscription data, enable or disable CDN repositories, and proxy settings in rhsm.conf. Does not cover Satellite server installation or Rocky or AlmaLinux repository setup.
Related guides How to get RHEL for free
Download a full RHEL repository for offline use
Install EPEL on RHEL-compatible distros

Red Hat Enterprise Linux downloads updates and add-on content from Red Hat CDN repositories after the host is registered with Subscription Manager. On RHEL 10, Simple Content Access lets registered systems consume content available to the organization without attaching a subscription to each host.

RHEL 10 also supports registration with rhc connect, which can enable content access and Red Hat Lightspeed services together. This guide focuses specifically on the traditional subscription-manager workflow.

IMPORTANT
This workflow is RHEL only. Rocky Linux, AlmaLinux, Oracle Linux, and CentOS Stream do not use subscription-manager — they configure their own base repositories locally.

When you need Subscription Manager

You need registration when:

  • A fresh RHEL install should pull packages from cdn.redhat.com instead of installation media only.
  • dnf repolist shows no Red Hat CDN repos or reports subscription errors.
  • You are building an RHCSA certification course or RHCE lab on official RHEL media.

Registration is not required on Rocky or AlmaLinux lab hosts that intentionally mirror upstream without a Red Hat subscription.


Prerequisites

  • A Red Hat account with an active RHEL subscription. For a personal lab, the no-cost Red Hat Developer Subscription for Individuals is enough. The account and activation steps are covered in how to get RHEL for free. In an organization, use the subscription and credentials provided by your Red Hat administrator.
  • Outbound HTTPS to the RHSM and CDN endpoints Red Hat requires (port 443), or a configured proxy documented below. Environments with hostname allowlists may also need Red Hat's documented Akamai CDN domains — see How to access RHSM through a firewall or proxy.
  • Root or sudo on the RHEL host.

Confirm the OS major version before you register:

bash
cat /etc/redhat-release
output
Red Hat Enterprise Linux release 10.2 (Coughlan)

Choose a registration method

Method Best for Jump to
Interactive register One-off lab or admin workstation; portal password at the prompt Portal username and password
register --username Same workflow; pass the portal username on the command line Portal username and password
Activation key Kickstart, golden images, and automation without a portal password on disk Activation key
HTTP proxy Hosts that reach Red Hat through a corporate proxy (config or --proxy) Proxy in rhsm.conf

RHEL 10 also provides rhc connect as Red Hat's simplified registration method. It can register the system for Red Hat content while optionally connecting Red Hat Lightspeed analytics and remote-management services. This article focuses on subscription-manager; see Registering RHEL with the RHC client for the current RHC workflow.


Check whether the system is already registered

Start with overall status:

bash
sudo subscription-manager status
output
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Registered

On RHEL 10, Overall Status: Registered is the high-level signal that Subscription Manager considers the host registered. For the authoritative registration check, use identity:

bash
subscription-manager identity
output
system identity: 2967b906-fcc1-451b-ad94-6129221e37a6
name: localhost.localdomain
org name: 20654856
org ID: 20654856

A valid system identity UUID and org ID confirm the host is registered to your organization.

subscription-manager list shows installed product certificates on the host. It describes which Red Hat products the system reports; it does not prove that a legacy entitlement is attached or that content is available under Simple Content Access.

List the Red Hat products identified on the installed system:

bash
subscription-manager list
output
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux for x86_64
Product ID:   479
Version:      10.2
Arch:         x86_64

On this lab host the system was already registered, so the steps below show what you run on a new install and how to verify success afterward.


Register with portal username and password

The interactive method prompts for credentials in your terminal. Run the command interactively so the password is read at the prompt and is not stored in shell history or scripts.

Use the same Red Hat login and password you use to sign in to the Red Hat Customer Portal or Hybrid Cloud Console. If you do not have an account, create one from the Red Hat account registration page.

bash
sudo subscription-manager register

Sample output after a successful registration:

output
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: your-portal-user
Password:
The system has been registered with ID: 2967b906-fcc1-451b-ad94-6129221e37a6

You can pass the username on the command line and still type the password only at the prompt:

bash
sudo subscription-manager register --username your-portal-user

Do not put portal passwords in shell history, Kickstart %post scripts, or documentation. Prefer activation keys for automation.


Register with an activation key

Activation keys avoid storing your portal password on the host, which is why they are the right choice for Kickstart, image builds, and shared lab templates. Registering this way needs two values from the portal, and both appear on one page in the Red Hat Hybrid Cloud Console. Red Hat replaced the legacy access.redhat.com/management/activation_keys interface, so the old Customer Portal subscription pages no longer manage keys.

Open Services > System Configuration > Activation Keys in the console. This page shows your numeric Organization ID along with any existing activation keys. If you need a new key and have the required permissions, click Create activation key, give it a name that says what it is for, such as rhcsa-lab, set any system purpose or repository options your systems need, and click Create.

One detail catches people out here. The Key Name shown on the Activation Keys page is the value you pass to --activationkey. You do not need to look for a separate password or secret value to use with this command.

With both values in hand, register the host in one command:

bash
sudo subscription-manager register --org YOUR_ORG_ID --activationkey YOUR_KEY_NAME

Sample output after a successful registration:

output
The system has been registered with ID: 62edc0f8-855b-4184-b1b8-72a9dc793b96

The returned ID is the system's identity in your organization, and subscription-manager identity confirms afterwards which organization the host joined. If the console shows an organization ID of 12345678 and a key named rhcsa-lab, the same command reads like this:

bash
sudo subscription-manager register --org 12345678 --activationkey rhcsa-lab

Substitute your own organization ID and key name in those two positions. Because the key carries the entitlement decisions, no portal password appears in shell history, Kickstart %post blocks, or image build logs.


Confirm registration and refresh subscription data

After you register with either method above, confirm identity and refresh local RHSM data:

bash
subscription-manager identity

A valid system identity UUID and matching org ID mean the host joined your organization.

bash
sudo subscription-manager refresh
output
All local data refreshed

subscription-manager refresh updates local subscription and entitlement data from Red Hat. It does not rebuild DNF package metadata. RHEL 10 uses Simple Content Access — you do not attach a subscription or pool to an individual system after registration.


Configure a proxy in rhsm.conf

When the host must reach Red Hat through an HTTP proxy, edit /etc/rhsm/rhsm.conf under the [server] section:

text
proxy_hostname = proxy.example.com
proxy_port = 3128
proxy_user = proxyuser
proxy_password = proxypass
no_proxy = .example.com,localhost

Leave proxy_hostname and proxy_port empty when no proxy is required. An invalid value such as proxy_port =-1 causes errors like unable to connect to host:-1 on identity and repos subcommands — clear the port or set a real proxy port.

Hosts that must reach Red Hat directly for some destinations but use a proxy for others can set no_proxy in the same [server] section (comma-separated host suffixes or names). You can also persist the value with:

bash
sudo subscription-manager config --server.no_proxy='.example.com,localhost'

For persistent proxy settings without editing the file by hand:

bash
sudo subscription-manager config --server.proxy_hostname=proxy.example.com --server.proxy_port=3128

Verify what Subscription Manager will use — populated proxy_hostname and proxy_port lines confirm the settings took effect:

bash
subscription-manager config --list
output
proxy_hostname = [proxy.example.com]
   proxy_port = [3128]

Register through a proxy for a single session with the register subcommand's --proxy flag (not the config option names):

bash
sudo subscription-manager register --proxy=proxy.example.com:3128

Confirm CDN repositories in dnf

Once Subscription Manager enables CDN repos, dnf repolist should show BaseOS and AppStream for your major version — see the dnf command if you need to filter or inspect individual repos.

Enabled repositories should include BaseOS and AppStream for your major version:

bash
sudo dnf repolist
output
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)

List repositories Subscription Manager knows about:

bash
subscription-manager repos --list-enabled
output
Repo ID:   rhel-10-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)
Enabled:   1

Repo ID:   rhel-10-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
Enabled:   1

If dnf still reports no repos, see no enabled repos troubleshooting after subscription-manager identity succeeds and you have checked enabled repositories.


Enable and disable repositories

BaseOS and AppStream are required RHEL 10 content sets — keep them enabled. To reduce the enabled content set or test repository-dependent package availability, disable an optional repository such as CodeReady Linux Builder (confirm the exact repo ID on your system with subscription-manager repos --list):

bash
sudo subscription-manager repos --disable codeready-builder-for-rhel-10-x86_64-rpms
output
Repository 'codeready-builder-for-rhel-10-x86_64-rpms' is disabled for this system.

Re-enable it when you need development packages again:

bash
sudo subscription-manager repos --enable codeready-builder-for-rhel-10-x86_64-rpms
output
Repository 'codeready-builder-for-rhel-10-x86_64-rpms' is enabled for this system.

Wildcards work for families of repos (use carefully):

bash
sudo subscription-manager repos --disable='*debug*'

After you change enabled repositories, refresh DNF metadata so dnf sees the updated redhat.repo file:

bash
sudo dnf makecache
output
Updating Subscription Management repositories.
Metadata cache created.

Unregister from Subscription Manager

Unregister before you delete a VM or clone a golden image so the portal does not keep stale system profiles.

bash
sudo subscription-manager unregister

Sample output:

output
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.

subscription-manager unregister removes the registration and locally deletes identity and subscription certificates. Use subscription-manager clean only when you also need to remove remaining local subscription, identity, and cached RHSM data before re-registering — for example after a failed registration or when troubleshooting a clone. clean does not reset proxy or other settings in /etc/rhsm/rhsm.conf.

bash
sudo subscription-manager clean

You can also remove a system profile from the Hybrid Cloud Console if the host is already destroyed.


Troubleshooting

Symptom Likely cause Fix
Overall Status: Unknown or Not Registered Host never registered or certificates removed Run subscription-manager register with portal credentials or an activation key
Proxy error / unable to connect to host:-1 Invalid proxy_port or proxy host in rhsm.conf Clear proxy settings or set valid proxy_hostname and proxy_port
dnf shows no Red Hat repos Repos disabled, content unavailable for the organization, stale certificates, or connectivity failure subscription-manager identity; subscription-manager repos --list-enabled; enable BaseOS and AppStream; subscription-manager refresh; then dnf makecache. Do not use attach --pool on RHEL 10
Invalid username or password Wrong portal credentials Reset password in the portal; prefer activation keys for automation
Stale system in portal after VM delete Host was deleted without unregister Remove the system in the Hybrid Cloud Console or Customer Portal; run subscription-manager clean on any surviving clone only if local subscription, identity, or cached RHSM data remains

References


Summary

Registering RHEL with subscription-manager connects the host to your organization under Simple Content Access. Check subscription-manager status and subscription-manager identity first — many lab VMs are already registered after install. For new systems, run register interactively (password at the prompt only) or use an activation key, taking both the organization ID and the key name from the Activation Keys page in the Hybrid Cloud Console.

After registration, run subscription-manager refresh to update local subscription data, confirm BaseOS and AppStream with dnf repolist, and use dnf makecache after you change enabled repositories. Optional repos such as CodeReady Linux Builder can be toggled with subscription-manager repos; you do not attach a pool per host on RHEL 10. Fix proxy settings in /etc/rhsm/rhsm.conf or with subscription-manager config when identity or repo commands fail with proxy errors.

Before you delete a VM, run subscription-manager unregister so portal inventory stays accurate. Use subscription-manager clean only when leftover local subscription, identity, or cached RHSM data blocks a clean re-registration. RHEL 10 also offers rhc connect as a simplified registration path; this article documents the subscription-manager workflow, which remains available when you specifically need the Subscription Manager client.


Frequently Asked Questions

1. Do Rocky Linux and AlmaLinux use subscription-manager?

No. Rocky Linux, AlmaLinux, Oracle Linux, and CentOS Stream use their own repository configuration, not Red Hat Subscription Manager. This guide applies only to Red Hat Enterprise Linux systems entitled through the Red Hat Customer Portal.

2. How do I register RHEL without typing my password into a script?

Run sudo subscription-manager register in an interactive terminal and enter your password at the prompt, or use an activation key with --org and --activationkey so no portal password is stored on disk.

3. Where do I find my Red Hat organization ID and activation key?

Sign in to the Red Hat Hybrid Cloud Console at console.redhat.com and open Services > System Configuration > Activation Keys. That page shows your numeric organization ID and your existing keys, and it replaced the legacy access.redhat.com activation key interface. The Key Name listed there is the value you pass to --activationkey; there is no separate password or secret value to look up for that command.

4. Why does dnf report no enabled repositories after registration?

The host may be registered but repositories are disabled, content is unavailable for your organization, certificates are stale, or connectivity failed. Run subscription-manager identity, then subscription-manager repos --list-enabled, and enable BaseOS and AppStream for your major version. Under Simple Content Access, attaching a pool is not the fix.

5. How do I unregister RHEL before deleting a VM?

Run subscription-manager unregister to remove the registration and system profile from the portal. Use subscription-manager clean only when you also need to remove remaining local subscription, identity, and cached RHSM data before re-registration.

6. Does RHEL 10 still use subscription-manager attach --pool?

RHEL 10 uses Simple Content Access and removes the per-system entitlement-attachment workflow. Register the host and enable the required repositories; do not use attach --pool.
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with more than 15 years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, networking, and security, delivering robust and efficient solutions for diverse projects.

  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security
  • Cloud Computing
  • Kubernetes
  • Linux
  • Ansible (software)