By default not only in Ubuntu 20.04 but in previous versions such as Ubuntu 19.10/18.04… there would not be any password for the root user, however, we can set it manually using the command line terminal.
Requirements
Of course, you need an installed Ubuntu 20.04 and a non-root user with sudo
access to initiate the administrative commands.
Steps to set Ubuntu 20.04 LTS root password
Here we will learn the method to create a root password for both Ubuntu Desktop and server latest operating systems, however, you can use the same command in earlier versions 19.10/19.0418.04,16.04 including Linux Mint. Nevertheless, there is no compulsion to go for this, even sudo
user is enough to run commands and if you don’t want to use sudo
every time, then, gain the escalated privileges or root access using the command: sudo -i
Still, if you to use the password for root then there are the steps…
Run Passwd command to set or change the root password
Open the command terminal on GUI Desktop of Ubuntu 20.04 either through Activities or simply by using the CTRL+ALT+T keyboard shortcut. If you are on the server, the CLI is already there, go ahead with the command:
sudo passwd root
Supply your sudo
user password and then Enter the New password two times for the root user and everything is set.
The above command can also be used in future to change the root password as well, in case you forget that, but make sure you have the access of sudo
the non-root user. However, if you don’t have any of them or forget both root and non-user password. Then open the Grub menu and follow the advance steps to reset the Ubuntu 20.04 password.
Login as root
su root
To confirm whether you got the access simply type: whoami
So this was the quick tutorial on this subject.
Other Articles:
- How to install Docker-CE on Ubuntu 20.04 LTS Focal Fossa
- How to install Google Chrome on Ubuntu 20.04
- Ubuntu 20.04 LTS stuck login loop: General Solution
- How to Upgrade Ubuntu 18.04 LTS to 20.04 LTS on WSL
Related Posts
How to Reopen Closed Windows or Tabs in Firefox
How to Install Django on Windows 11 or 10
How to set Gemini by Google as the default Android assistant
How to create data bars in Microsoft Excel for numeric values
How to open HEIC images on Windows for free
How to install Server Manager Windows 11 or 10