# ubuntu设置root密码

ubuntu@ubuntu:~$ sudo passwd
[sudo] password for ubuntu: 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

之后就可以用su 来切换到root用户了

su root
Last Updated: 4/2/2020, 10:01:04 AM