After ubuntu Desktop is installed, switch to the root user and set the root password.
Solution 1,
After ubuntu Desktop is installed, switch to the root user:
:~ $ Sudo-s-H
Use the above command to switch to the root user
Run the following command under the root user:
:/# Passwd
Set the root user password
After modifying the root password of the ubuntu system through the above method, you can run the following command:
:~ $ Su root
Enter the root password to switch to the root user.
Solution 2,
This method is relatively simple for many online users.
After the ubuntu system is installed, run the following command to start the installation:
:~ $ Sudo passwd root
Then, the system prompts you to enter the password of the current user.
Then you will be prompted to enter a new UNIX Password.
After you enter the same password twice, a message is displayed, indicating that the password is successfully modified.
Then you can use
:~ $ Su root
Command to enter the root user