- This lesson is dedicated to the root user.
Now, what is the root user?
The root user is the almighty administrator user.
There are no restrictions to the root user at all,
and that makes the root user in Linux
more powerful than administrator in a Windows environment,
for instance,
because an administrator user
in a Windows environment is just a user that has
all privileges that you can imagine.
The root user in Linux is living
in a world where privileges do not apply.
And this world is called Linux kernel space.
The Linux kernel is the heart of the operating system
and there are no restrictions
in what the Linux kernel can do.
Because it's the heart of the operating system,
it needs to be able to do everything.
And in that environment,
we need a user and that's the root user.
So the root user needs no permissions to
whatever root wants to do.
And that's because a root has kernel level access.
And that makes root an unlimited user account.
Using this account should be avoided for that reason.
Now, the good thing is
that recent Linux distributions either
don't set a password for the root user,
so you cannot use it,
or they make enabling the root user optional,
so that it's your choice.
In all the Linux distributions,
it was common to set a root password while installing
and not do anything else.
So there, it was common to open a shell as the root user.
Nowadays, we don't do that anymore.
The best alternative to using the root user is
to use sudo.
Sudo does require authorization,
so it doesn't work for any user.
It only works for authorized users.
And sudo is what you put in front of a command.
We've already seen it a couple of times.
If you put sudo in front of a command,
you run that specific command with super user powers.
Alternatively, there is also su.
su can be used to open a root shell
after logging in as an ordinary user,
but su is going to prompt you for the root password and
how is that going to work if you don't have a root password?
Well, it doesn't,
and that is what makes su of limited use.
In the next video,
we will further explore the use of sudo as well as su.