becoming Super User

Asked by dallas

how to become SU in a terminal

Dallas

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
fantasai
Solved:
Last query:
Last reply:
Revision history for this message
fantasai (fantasai) said :
#1

If you prepend 'sudo' to your command, it will ask you for your password and will execute with root privileges. (The first user created has sudo privs.)
You can also open a root terminal from the Applications > System Tools menu, again with your regular password.

If you really want su access, you need to set the root password. Try 'sudo passwd' for that. *hasn't actually tried that yet*

Revision history for this message
Ashish Kulkarni (ashkulz) said :
#2

Try 'sudo bash', it'll drop you into a root shell when you enter your password. I generally do this if I have to execute lots of commands as root.

Revision history for this message
Matthew Paul Thomas (mpt) said :
#3

Don't use "sudo bash"; it doesn't reset your environment variables to match, so you may end up with files belonging to "root" in your home directory instead of in /root. This in turn will cause problems when you try to run software like vim, Gnome, or KDE later on, as they will try to write to these files and not be able to because they're owned by "root".

Instead, use "sudo -i".

For more info, see <https://wiki.ubuntu.com/RootSudo>.

Revision history for this message
Robert_In_Aus (robert-synapticsolutions) said :
#4

su -

This changes you to superuser [root] and puts you in roots environment. This is much more comfortable place to be!
It is not good practice to do things as root. The sudo command is much better.
In fact with Ubuntu i rarely do anything as the real root user.

Revision history for this message
madcrow.maxwell (madcrow-maxwell) said :
#5

To use the real root account, you have to manually set the password from a superuser terminal window. It's not usually worth doing, but sometimes having an actual root account available in textmode can be useful if something screws up.

Revision history for this message
dallas (dallas-stafford) said :
#6

Thank you for the guidance. and for pushing me to reply to this request.
I tend to be a lurker and don't write much.
forcing me to reply really makes for more of a community feeling.
I stumbled across giving the password to root but now I understand clearly why sudo is used.
I really appreciate the education.
Dallas Stafford - Seattle