linux中的“xxx is not in the sudoers file. This incident will be reported.纯文字配合图片(小白入门linux踩坑)

当你要切换为超级用户权限时,或者安装一些软件出现报错xxx is not in the sudoers file. This incident will be reported.

第一步登入你的用户

命令     su回车

输入用户密码

第二步添加 用户权限

命令    visudo 进入这个页面找到root如图所示

linux中的“xxx is not in the sudoers file. This incident will be reported.纯文字配合图片(小白入门linux踩坑)

这是你发现你不能直接进行添加的

linux中的“xxx is not in the sudoers file. This incident will be reported.纯文字配合图片(小白入门linux踩坑)

然后按Esc

之后执行保存操作

:wq 回车

完事了

之后检验

sudo su

然后输入密码

就可以看到

linux中的“xxx is not in the sudoers file. This incident will be reported.纯文字配合图片(小白入门linux踩坑)

# 代表的就是超级用户