作者:sunshinena | 来源:互联网 | 2023-09-08 12:35

但是输完密码后发现还是不行:

有时候,我们在以普通用户执行一些操作的时候,为了提升自己的权限,我们会以管理员身份执行我们的指令,于是我们会敲出类似于sudo……这样的代码。
但是不巧的是,当我们敲除了这样的代码之后,我们得到了“xxx is not in the sudoers file. This incident will be reported.”这样的提示信息,这个时候我们该怎么做呢?
解决这个问题的办法是:直接切换到root用户,即su root即可。当我们再次执行一开始的命令的时候,就没问题了。
如下操作:

这样再次进行vim操作就可以编辑保存了!!!!!!