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
Got Feedback? Join the discussion at discuss.howtogeek.com
Comments (6)
Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on Google+ if you'd like.
- Published 09/11/06




This is always good, if you are familiar with System Administration and you should know what you are doing :-)
Good to know! In Fedora you would just do:
su -
:)
You could also sudo bash which will keep you in root mode until you close the terminal window
This one does the job, too:
sudo su
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?
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’).