- Open a Root Terminal and type visudo (to access and edit the list)
- Using the up/down arrows , navigate to the bottom of the sudoers file that is now displayed in the terminal
- Just under the line that looks like the following:
root ALL=(ALL) ALL
- Add the following (replacing user with your actual username):
user ALL=(ALL) ALL
- Now press Ctrl+X and press Y when promted to save
That's it, your new user now has root privileges!
本文详细介绍了如何通过编辑sudoers文件为普通用户授予root权限的步骤,确保操作的安全性和便捷性。
632

被折叠的 条评论
为什么被折叠?



