ObjectiveThe objective is to access root shell and optionally change the default root blank password on Ubuntu 18.04 Bionic Beaver Linux.
Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver Linux
RequirementsPrivileged access to your Ubuntu System as root or via
sudocommand is required.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
InstructionsThere is no default root password on Ubuntu 18.04 Linux. However, if you need to execute a command with root privileges you can prefix your command with
The below example will execute the
whoamicommand as a root user. Replace the below
whoamicommand with the command you wish to execute as root:
$ sudo whoamiIf you do not wish to use the
sudocommand every time you need to execute a command with root privileges you can gain the root shell by using the
sudocommand and its
$ sudo -i #Please note that your command prompt will change from
#which indicates that you are currently logged in as root.
If you wish to change the default blank root password and set root password enter:
$ sudo passwd