原文:Here’s a quick-and-dirty method that helps you in using su, even on Ubuntu. It will enable you to execute privileged commands from now on. First, use the command sudo su When asked for a password, enter the password assigned to your user account. Next, use the command passwd to give the user root a password. From this moment on, you can also log in as root on Ubuntu.
方式一:普通用戶登錄系統後,運行
$ sudo su 輸入當前用戶密碼,進入root用戶 # passwd 修改root密碼
方式二:新裝系統時,進行root密碼修改
$ sudo passwd root
之後就可以使用su命令切換到root用戶來執行某些更高權限的操作。