1、切换超级用户 su - root 2、编辑配置文件 vim /etc/sudoers
su - root
vim /etc/sudoers
## Allow root to run any commands anywhere root ALL=(ALL) ALL username ALL=(ALL) ALL
普通用户添加sudo权限
原文:https://www.cnblogs.com/browselife/p/10646385.html