5

How is being the root user different from being the super user? If it is different anyways, is there a way to use the shell as the root? Is there a root password for that? Is it different from the super user password?

6

How is being the root user different from being the super user?

It's the same, see comment by edwin. Note, however, that the Ubuntu (and generic Unix) superuser is determined by its numeric id, rather than the username. The superuser is the one with a UID of "0". Conceivably you could have a user named "noob" with an UID of 0, this would constitute a superuser but wouldn't namely be root. This is however very convoluted, for all practical purposes they are the same thing.

If it is different anyways, is there a way to use the shell as the root?

You can start a session as root, using the -i option to sudo (for opening an *i*nteractive session):

sudo -i

You will be asked for your user's password, to confirm your identity (same as when you run sudo elsewhere). Then you'll be left in a root (or superuser) shell.

Is there a root password for that?

By default the root user has no password assigned in Ubuntu, you can assign one if you like but it's better to use a normal user and sudo -i if needed. It's even better to just use sudo for specific commands, rather than use a session.

Is it different from the super user password?

Only if you have another user with id 0.

  • Are you sure -i stands for "interactive"? Running sudo -i simulates an initial login shell, which is what distinguishes it from -s, which also starts an interactive shell, but without an environment like what an initial login shell would have. My understanding is that the -i is for "initial." – Eliah Kagan Oct 11 '17 at 22:24
3

root is the superuser on Linux system. root is the first user created during the process of installing any Linux distro like Ubuntu for example. Most administration tasks, such as adding users or managing file systems require that you first log in as root (UID=0) .

The root account, also known as the superuser account, is used to make system changes and can override user file protection. root has unlimited powers, and can do anything on system hence the term superuser is used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.