Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Created May 10, 2019 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxfight3r/433c60ec8b21cedf30741dcd3b7d6b5a to your computer and use it in GitHub Desktop.
Save tuxfight3r/433c60ec8b21cedf30741dcd3b7d6b5a to your computer and use it in GitHub Desktop.
rhel subscription manager notes

rhel rhsm commands

# get the status of the node
subscription-manager status

# list the subscriptions attached
subscription-manager list
subscription-manager list --available
subscription-manager list --consumed

# Register a node to rhel subscription
subscription-manager register
subscripton-namager register --auto-attach --user=username --password=XXXX --proxy=XXX(optional)

# Unregister a node from rhel subscription
subscription-manager unregister

# delete specific subscription before unregistering
SERTIAL=$(subscription-manager list --consumed |awk '/Serial/ {print $2}')
subscription-manager remove --serial $SERIAL
sudo subscription-manager unregister

# auto attach subscription that's available
subscription-manager auto-attach

# attach a specific pool id
subscription-manager attach --pool=XYZ01234567

useful links: https://access.redhat.com/sites/default/files/attachments/rh_sm_command_cheatsheet_1214_jcs_print.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment