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

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

普通用户下无法使用sudo命令


1、su -

    进入root用户。

2、visudo

    visudo是一个命令,直接打开一个文件。

3、字打开的文件中执行 shift + G到达最后一行,然后输入o另起一行。

    在新起的一行中,加一句your_user_name      ALL=(ALL)       ALL

    其中your_user_name是你的用户名。

猜你喜欢

转载自blog.csdn.net/zhuzitop/article/details/80252601