1. Press ctrl + alt + T, enter sudo passwd root to set the root password, as shown in the following figure:
2. Use su root to test whether you can enter the root user. If # appears, the password of the root user has been set successfully, as shown in the following figure: