1, open the terminal with the current login user, in the terminal input command sudo passwd, enter the current user's password and then return
2, will be prompted to enter a new password, enter the completion of the return
3. Then prompt to enter a new password again to confirm, then enter, set the success
[Email protected]:~$ sudo passwd
[sudo] password for LINUXIDC:
Enter a new UNIX password:
Re-enter the new UNIX password:
passwd: Password has been successfully updated
[Email protected]:~$
Note: This new password is the root password, which can be different from the current user's password.
Enter SU root in the terminal and enter the root password to verify the success of the switch to the root user. After the root user has finished the operation, the Exit command can be used to exit the root user and return the current logged-on user.
Set root password after Ubuntu installation