Skip to content

April 25, 2016

Becoming root on Ubuntu Linux

by linux

If you are using Ubuntu Linux you’ve logged in as an user. If you want to become root so you won’t have to input sudo on every command you run, here’s what you need to do:

sudo su


sudo su -

which is probably what you really want. su – will invoke a login shell after switching the user. Just running su with no parameters will just switch the user (keeping the old shell and environment variables).

You can also run:

sudo -i

Then you get the root prompt and you will be able to run any command as root.

Read more from Linux Quick Tips

Leave a Reply


Note: HTML is allowed. Your email address will never be published.

Subscribe to comments