In the ubuntu virtual machine installed in vmware, the root password was not entered during the installation process, which resulted in no idea of the root password after entering the system. In fact, this is due to the security considerations of the ubuntu system, which shields the user from setting the root password during the installation process. The solution is as follows:
Open the terminal and enter: sudo passwd
Password: <— Enter the password of your current user
Enter new UNIX password: <— New Root user password
Retype new UNIX password: <— Repeat the new Root user password
passwd:password updated successfully
After success su-root
After entering the root password just set, you can successfully switch to the root user.