How to get root shell in Ubuntu GNU/Linux

A lot of my friends has been asking me about this very question, “how to get root shell in Ubuntu”. Naturally I would ask them to use the “sudo” command as it suffice to execute any task restricted to root only. It is explicit, and it is safer than using root account, that’s why ubuntu never prompted root password during installation.

However for some reasons, some people would prefer a full root shell instead of using “sudo” command. And here is how to obtain root shell access in Ubuntu GNU/Linux.

Method 1

From Desktop, launch the “Terminal” application, accesible through clicking Applications->Accesories->Terminal.

Execute this command,

mypapit@enterprise:~$ sudo -s
Password:

Enter your user password, and then you’ll get the root shell “#”.

Method 2

Same as method 1 but execute this command,

mypapit@enterprise:~$ sudo su
Password:

Enter your user password, and then you’ll get the root shell “#”.

So there you go, that’s how to get root shell access within your Ubuntu GNU/Linux. But as for me, I think I can settle with the sudo command, as I haven’t found a situation where I need to use the root shell explicitly.

Good luck !

11 Replies to “How to get root shell in Ubuntu GNU/Linux”

  1. Thank you, very useful *thumbsup*

    I tried to echo-append something to /etc/ca-certificates.conf using sudo and got “permission denied”.

  2. thank you google for help in search for quistion and thanku very much for answer from
    websit.
    again thanku.

    P.L. Dave.

  3. can anyone tell that how can a program is compiled and run using ubuntu 8.04?

  4. Very nice :-) first hit at google and it helps…
    needed the root shell for installing vmware tools :-)

Comments are closed.