Take the 2-minute tour ×

I always thought "root" was a default user created when you install basically any Linux. During installation, it asked me to choose a username, so I picked "devadmin". Is that my "root" user now?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

You have a single user, who can use sudo.

To become actually root:

sudo su

To HAVE a root account:

sudo passwd root 

(then type a new password, and that will be your new root account's password.)

share|improve this answer
Is there any reason to make a root account? Also, with a root account do you still have to type sudo, or does root have all permissions without sudo-ing? –  orokusaki Mar 3 '12 at 18:06
@orokusaki It's bad to run everything as root. You don't work as SYSTEM on Windows either. Your regular user is probably a sudoer (man sudo/man sudoers) though, so you can "become root" for specific administrative tasks limited in scope. –  Daniel Beck Mar 3 '12 at 18:31
@DanielBeck: There is nothing wrong with having a root user on your computer. Sure, great power, comes with great responsibility. But you can do stupid things even with sudo. Or even as a single user. So it's not like you break anything. (And root is been around for ever. Only Ubuntu started this trend, to disable it and have a sudo instead.) –  Shiki Mar 3 '12 at 18:33
Note that sudo su can be replaced by sudo -s. Both open a root shell for the current user who must be a sudoer. –  Daniel Beck Mar 3 '12 at 18:35
@Shiki It might be true that only Ubuntu started it rather recently (and I seriously doubt it), but that doesn't mean using the root account like a regular user account isn't a bad idea. --no-preserve-root is also a pretty recent addition to rm. Chances are, given the question, orokusaki is not experienced enough to be aware of all the implications. It's only safe advice to say: Unless there's a very good reason, don't do it. –  Daniel Beck Mar 3 '12 at 18:38
show 3 more comments

On every Linux system, there is a root account. It's safer to not use it for everyday tasks though, because careless typos on the command shell or bugs in software could otherwise seriously mess up your system.

The root account might not have a password, so you're not able to directly log in as root. But your primary user account is probably one of the sudoers, users able to use the sudo program to execute specific programs as root (sudo whoami) or, for longer administrative tasks requiring multiple steps, open a shell as root (sudo -s).

By running sudo passwd, you can set a password for root if you really need it, but it's likely that you don't and will just invite accidents like accidental file deletions.

share|improve this answer
add comment

If you need a root shell for a longer time you could use the -s option with the sudo command:

Just type

sudo -s

to create a permanent root shell. And type


to leave the root shell when you're done with your work.

share|improve this answer
add comment

Your Answer


