Red Hat Subscription Management (RHSM) is a customer-driven, end-to-end solution that provides subscription status and management tools and integrates with Red Hat’s system management tools.
If you encounter the below error while running the subscription-manager command:
subscription-manager: command not found
you may install the subscription-manager package as per your choice of distribution.
Distribution | Command |
---|---|
CentOS | yum install subscription-manager |
Fedora | dnf install subscription-manager |
subscription-manager Command Examples
1. Register and activate Red Hat Subscription:
# subscription-manager register --username your_username --password your_password
2. To unregister your system use unregister switch:
# subscription-manager unregister
3. To get a list of all your available subscriptions use list switch:
# subscription-manager list -available
4. To active it a subscription use the Subscription Pool ID:
# subscription-manager subscribe --pool=Pool ID number
5. Get a status of your consumed subscriptions:
# subscription-manager list –consumed
6. To check your enabled subscriptions use the below command.
# subscription-manager list
7. To remove all your active subscriptions use –all argument:
# subscription-manager remove --all
8. To remove a specific pool:
# subscription-manager unsubscribe --serial=Serial number
9. To list the available service levels:
# subscription-manager service-level --list # subscription-manager service-level --set=self-support
10. Enable Yum Repositories:
# subscription-manager repos --list