Setting root password after installation of Ubuntu 20.04 LTS

Environment:

ubuntu 20.04 LTS version

Questions:

How to set root password after installation of ubuntu 20.04 LTS

How: Method.

Use the command line sudo passwd to set the root password

The command line is as follows.

www@ubuntu:~$ sudo passwd
[sudo] password for www:
New password:
Retype new password:
passwd: password updated successfully
www@ubuntu:~$ su root
Password:
root@ubuntu:/home/www#

Description.
[sudo] password for www: enter the password for the current user
New password: Enter the password for root
Retype new password: Confirm the password for root
www@ubuntu:~$ su root Switch to the root user
Password: Enter the password you just set for root
root@ubuntu:/home/www# Successfully switched to the root user

done!

Similar Posts: