Access Root Shell in Ubuntu

On a typical Fedora installation, you are asked for a root password and you will given an option to create accounts for normal users.

On the other hand, Ubuntu only allows account creation for normal users, root logins are disabled by default.

When a user wants to perform administrative tasks, such as installing packages, sudo command is used to gain root access. As sudo command only works for a single action, it has to be entered for each and every administrative task.

Instead of using sudo to run each administrative task, you can open a root shell using sudo, and perform the administrative tasks within the root shell.

To open a root shell, run sudo as follows:

ibrahim@anfield:~$ sudo bash
[sudo] password for ibrahim:
root@anfield:~# id
uid=0(root) gid=0(root) groups=0(root)

The root shell is now ready for use.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, perl, php, python, java, javascript, nodejs, angular, react); plays_on(xbox, ps4); linux_desktop_user(true); }