-1

I have just started using using Linux and this is my first installation and one of the main things in the installation process is the user that you create.

Is the user that is created during the installation root? And if yes, is it same for every Linux distribution, i.e. first user being root?

Kulfy
  • 17,696
MartinCo
  • 41
  • 2

2 Answers2

3

The user you are prompted to create during Ubuntu install is NOT root. It's an admin (sudo) user instead.

Not all Linux distros install the same way Ubuntu installs. Some prompt you for a root password. Ubuntu does not.

user535733
  • 62,253
1

No, the user created during the installation process of Ubuntu is not root. Every Linux installation has a root user, but it's not recommended to use it for everyday work. Because root is allowed to do basically anything, it's very easy to wreck your system with a small oversight. Therefore, most (if not all) Linux distributions offer to create a "normal", non-privileged user during the installation process. It's recommended to use that user for everyday work, and only change to the all powerful root when you actually need to.

Ubuntu even goes a step further: In a standard Ubuntu installation, root doesn't have a password. Because of that, you can't open a session as root. If you need roots power, you use the sudo command instead.

sudo (an abbrevation for "switch user and do") executes the command that follows as another user. For example

ls /some/directory

is done with the user account you're logged in with.

sudo -u joe ls /some/directory

is done with the user joe and it's privileges.

If you don't specify a user name, sudo assumes root. Therefore,

sudo ls /some/directory

would execute ls /some/directory with the privileges of root.