Linux下解决用户不能执行sudo的方法

报错:

xxx is not in the sudoers file.  This incident will be reported.

Linux默认没有为当前用户开启sudo权限!

$ su  
$ visudo 

实际上是编辑/etc/sudoers文件
将zlex    ALL=(ALL) ALL加入其中:

找到下面的一行:
root    ALL=(ALL) ALL

加入下面这行:  

xxx   ALL=(ALL) ALL

原文地址:https://www.cnblogs.com/lcngu/p/5851867.html