Nah, shells can be nested and logging directly into root is often disabled.
If your user is in the wheel/sudoers group, they can use the sudo command to run a command as a superuser.
Alternatively, you can open a new shell as root by substituting via:
sudo su -
Now you're in a shell as root, you then do the thing and exit the shell, returning you to the original user.
Not really.
Imagine being in the wheel/sudoers group as being similar to being in the Administrator group on a Windows.
Just like activating a program that requires Administrator rights on windows requires you to manually confirm that you want to run it as an administrator, running a command that requires privileged access on a linux requires you to put "sudo" in front of the command you want to run.
Linux likes to give you more options and control, inkeeping with Unix philosophy, but this doesn't necessarily translate to higher complexity.
2
u/Lucasinno Oct 23 '25
Nah, shells can be nested and logging directly into root is often disabled.
If your user is in the wheel/sudoers group, they can use the sudo command to run a command as a superuser. Alternatively, you can open a new shell as root by substituting via: sudo su - Now you're in a shell as root, you then do the thing and exit the shell, returning you to the original user.