After installing Ubuntu, I suddenly realized that I didn't set the root password. without knowing the password, I could not access the root user. The default root password of Ubuntu is random, that is, a new root password is generated every time you start the system. We can enter the sudopasswd command on the terminal, and then enter the password of the current user
After installing Ubuntu, I suddenly realized that I didn't set the root password. without knowing the password, I could not access the root user.
The default root password of Ubuntu is random, that is, a new root password is generated every time you start the system. Enter the sudo passwd command on the terminal, enter the password of the current user, enter, and confirm. the new password is the new root password.
After the modification is successful, enter the command su root and then enter the new password.