Using root User on Ubuntu

By default, Ubuntu are using sudo by a sudoer to issue a root-only command rather than using root user. Sometimes it is annoying while you are configuring your Ubuntu box by typing sudo and password on every (root-only) command that you type.

You can activate the root user (and setup/change root password) using the following command:

aryo@ubuntu:~$ sudo su -
[sudo] password for aryo: 
root@ubuntu:~# passwd
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
root@ubuntu:~# exit
aryo@ubuntu:~$ su -

Then you may login as root using newly entered password and issue “root-only” command without being bothered by sudo and password on every command you type.

There is a better way to be root user without activating the root user itself if you are one of the sudoers. Just execute:

aryo@ubuntu:~$ sudo -i

and enter your own password, you’re now root!