CIS126RH | RHEL System Administration 1
Mesa Community College
Learn the subscription model and what registration provides
Use the command-line tool to register and attach subscriptions
Enable and disable software repositories based on needs
Diagnose and resolve common registration problems
Registration connects your RHEL system to Red Hat's infrastructure, enabling access to software updates, security patches, and support services.
Latest packages, bug fixes, and feature enhancements
Critical security updates to protect against vulnerabilities
Access to Red Hat's support team and knowledge base
Proactive system analysis and recommendations
developers.redhat.com
subscription-manager
Full control, scriptable
Recommended for servers
Settings → Subscription
User-friendly interface
Good for workstations
Anaconda installer
Register during setup
Enables install-time repos
# Command-line registration (most common for servers)
sudo subscription-manager register --username=your_username
# Kickstart (automated installation)
rhsm --organization=ORG_ID --activation-key=KEY_NAME
# Register interactively (prompts for username/password)
sudo subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: your_username
Password:
The system has been registered with ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# Register with credentials inline
sudo subscription-manager register --username=your_username --password=your_password
# Register and auto-attach best matching subscription
sudo subscription-manager register --username=your_username --auto-attach
# Register using activation key (no username/password needed)
sudo subscription-manager register --org=YOUR_ORG_ID --activationkey=your_activation_key
# Find your organization ID:
# Customer Portal → Subscriptions → Organization ID
# Activation keys are created and managed in:
# Customer Portal → Activation Keys
# Or in Red Hat Satellite Server
# List available subscriptions for this system
sudo subscription-manager list --available
# Auto-attach best matching subscription
sudo subscription-manager attach --auto
# Attach a specific subscription by pool ID
sudo subscription-manager attach --pool=POOL_ID
list --available or in the Customer Portal under Subscriptions.
# List currently attached subscriptions
sudo subscription-manager list --consumed
+-------------------------------------------+
Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server
Pool ID: xxxx-xxxx-xxxx-xxxx
Active: True
Ends: 12/31/2025
# List installed products (what is licensed)
sudo subscription-manager list --installed
# Remove a specific subscription
sudo subscription-manager remove --pool=POOL_ID
# Remove all subscriptions (keeps registration)
sudo subscription-manager remove --all
# List all available repositories
sudo subscription-manager repos --list
# List only currently enabled repositories
sudo subscription-manager repos --list-enabled
# Enable a repository
sudo subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms
# Disable a repository
sudo subscription-manager repos --disable=rhel-9-for-x86_64-supplementary-rpms
# Enable multiple repositories at once
sudo subscription-manager repos --enable=codeready-builder-for-rhel-9-x86_64-rpms --enable=rhel-9-for-x86_64-baseos-rpms
# Verify with dnf
dnf repolist
| Repository | Content | Default |
|---|---|---|
rhel-9-for-x86_64-baseos-rpms |
Core OS, kernel, basic utilities | ✓ Enabled |
rhel-9-for-x86_64-appstream-rpms |
Applications, languages, modules | ✓ Enabled |
codeready-builder-for-rhel-9-*-rpms |
Development headers, build deps | Disabled |
rhel-9-for-x86_64-supplementary-rpms |
Additional packages | Disabled |
rhel-9-for-x86_64-highavailability-rpms |
HA clustering (add-on sub) | Disabled |
# Overall subscription status
sudo subscription-manager status
+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: Current
System Purpose Status: Not Specified
# Detailed system identity
sudo subscription-manager identity
system identity: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
name: server01.example.com
org name: Your Organization
org ID: 1234567
# Check what subscriptions are consumed
sudo subscription-manager list --consumed
# Check what products are installed (are they covered?)
sudo subscription-manager list --installed
# View system facts (hardware info sent to Red Hat)
sudo subscription-manager facts
# Refresh subscription data from server
sudo subscription-manager refresh
# Check RHSM log for recent activity
sudo tail -f /var/log/rhsm/rhsm.log
# Unregister the system (releases subscription entitlement)
sudo subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
# Clean all local subscription data (no network call)
sudo subscription-manager clean
All local data removed
# Full reset workflow (unregister + clean + re-register)
sudo subscription-manager unregister
sudo subscription-manager clean
sudo subscription-manager register --username=USER --auto-attach
# Set system purpose attributes
sudo subscription-manager syspurpose set-role "Red Hat Enterprise Linux Server"
sudo subscription-manager syspurpose set-usage "Production"
sudo subscription-manager syspurpose set-sla "Premium"
# View current settings
sudo subscription-manager syspurpose show
Current Usage: Production
Current Role: Red Hat Enterprise Linux Server
Current Service Level Agreement: Premium
# Set system purpose during registration
sudo subscription-manager register --username=USER --auto-attach --service-level=Premium --usage=Production
subscription-manager statussubscription-manager identitycat /var/log/rhsm/rhsm.logsubscription-manager factsping subscription.rhsm.redhat.com# Test HTTPS connectivity to Red Hat CDN
curl -v https://subscription.rhsm.redhat.com:443/subscription
# Force re-registration
sudo subscription-manager unregister
sudo subscription-manager clean
sudo subscription-manager register --username=USER --auto-attach
# Configure proxy hostname and port
sudo subscription-manager config --server.proxy_hostname=proxy.example.com
sudo subscription-manager config --server.proxy_port=3128
# With proxy authentication
sudo subscription-manager config --server.proxy_user=proxyuser
sudo subscription-manager config --server.proxy_password=proxypass
# View current configuration
sudo subscription-manager config
[server]
hostname = subscription.rhsm.redhat.com
proxy_hostname = proxy.example.com
proxy_port = 3128
# Configuration file location
cat /etc/rhsm/rhsm.conf
subscription-manager config. The file is also read by DNF for repository access.
Red Hat Insights is a proactive analytics service included with all RHEL subscriptions. It analyzes your systems and provides actionable recommendations for security, performance, and stability.
# Install the Insights client
sudo dnf install insights-client
# Register with Insights
sudo insights-client --register
# Run analysis manually and upload results
sudo insights-client
# Check Insights registration status
sudo insights-client --status
console.redhat.com → Insights → Advisor
Runs automatically via cron after registration.
Registration enables access to updates, security patches, and support. Unregistered systems cannot receive packages from the Red Hat CDN.
subscription-manager is the primary tool: register, attach, repos, status, identity.
Activation keys enable secure, automated registration without exposing passwords — preferred for scripting and large fleets.
Enable additional repositories as needed: CodeReady Builder for development, Supplementary for extra packages.
subscription-manager with your Red Hat accountdnf repolistNext: Getting AI-assisted Help with Red Hat Enterprise Linux Lightspeed