How-To Geek

Make Ubuntu Stay in Root Mode

Instead of having to constantly type in ‘sudo’ every time you need to make an admin change, you can use one of these commands to act as root.

To switch to full root mode:

sudo -s -H

To switch to using root mode, but still act as your user account:

sudo -s

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 09/11/06

Comments (6)

  1. Manjula

    This is always good, if you are familiar with System Administration and you should know what you are doing :-)

  2. Alekz

    Good to know! In Fedora you would just do:

    su –


  3. Shon

    You could also sudo bash which will keep you in root mode until you close the terminal window

  4. Joe

    This one does the job, too:

    sudo su

  5. harry

    Actually, joe, that doesn’t quite do the trick.

    sudo su – root

    is the proper way to do it. Seriously though. An entire post on switching to root? Really?

  6. Chiron613

    How about:

    sudo passwd

    Then enter your own password (as a regular user)

    You will be asked for root password (which might as well be the same password you use as user). As usual, it will ask you to confirm the password to avoid typos.

    Now you’re able to su whenever you need to be root for a while.

    Having said all this, it’s probably not a good idea to actually *use* su, except when you’re going to have a prolonged session as root. Typing ‘sudo’ isn’t all that difficult. And if you forget after typing some long, complicated line, you can just type ‘sudu !!’, and hit return. The ‘!!’ tells your shell to append the last command onto your present one (where you typed ‘sudo’).

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!