Subscribe to 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

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 09/11/06 and tagged with: SysAdmin, Ubuntu

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:
Similar Articles Featured Wiki Articles
Latest Software Reviews Quick Linux Tips
Geek Arcade Popular Forum Threads

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’).


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.