In this video, we'll explore subscription manager.
To use RHEL, you need to register the system and attach a subscription.
Before completing this procedure, you'll have no repository access.
If you cannot register RHEL, the only option is to use repositories you have provided yourself,
as you have learned in the preceding lessons.
And let me be clear about it.
The preceding lessons is what we are going to do here.
And subscription manager is not to be done here.
Do not register your system, okay?
Because it will break the labs and it will make your system behave in a way
that doesn't correspond to what you will find on the exam.
So to register, use subscription manager register.
You will be prompted for the username of the user account to which the subscription is connected.
And if ever you need to unregister a system, you can use subscription manager unregister.
After registering, entitlements certificates are added.
These are added to different files.
ETC PKI product indicates the installed Red Hat products.
There is a consumer which identifies the Red Hat account for registration.
And the entitlement indicates which subscription is attached.
And if you want to, you can use RHCT command to check the current entitlements.
So this is what it will look like.
Let me show you how to register a system with a subscription manager.
Because in real life, that is an important skill.
But I repeat, do not do this on the machine that you are using to practice for your RHCSA exam.
So you can see after logging in, if you're not registered, that it's complaining system not registered.
You can go here to register your system.
You can also do it command line.
Let's do it command line because that's more universal.
So sudo subscription manager register would register it.
But hey, look at the hostname.
Currently, my hostname is set to localhost.
Really? I don't like that.
So let me use sudo hostnamectlhostnamerhcsa3.example.com.
That's a small typo.
And then you can use the subscription manager command.
So sudo subscription manager register is going to contact the register service.
It's asking for your Red Hat username.
And let me enter my username.
That's your personal username, of course.
You need your Red Hat developer account in order to do so.
And then you enter your password, and you can connect your system.
And if all is going well, you will get a message within a few seconds
telling you that the system has successfully been registered.
So here we can see registration is successful.
And that means that you can continue and use the Red Hat online repositories.
I do recommend you have a look at it.
But again, don't focus on it too much for your exam.