在安装软件包的时候,会提示没有sudo权限。 eg : sudo apt-get install golang
进入有root权限的用户 eg: su root
并根据提示输入密码
sudo vim /etc/sudoers
# User privilege specification
root ALL=(ALL:ALL) ALL
"你的用户名" ALL=(ALL:ALL) ALL
:wq!
sudo cat /etc/sudoers
原文:https://www.cnblogs.com/dylancao/p/9234152.html