怎样添加sudo|is not in the sudoers file

2024-11-01 20:40:48

1、执行命令:su -,输入超级管理员密码后切换到超级用户。不要漏掉“-”哦(-把root的环境变量传过去)。

怎样添加sudo|is not in the sudoers file

3、这是就会进入编辑界面,添加一行:user_name ALL=(ALL) ALL,然后保存并退出。(系统默认的编辑器可能讵畿缤耒会不一样哦,小编的是nano,退出时输入“ctrl+x”,如果是vi则是输入“a”进入编辑模式,添加完后按“esc”退出编辑模式,输入“:wq”保存并退出)。

怎样添加sudo|is not in the sudoers file

5、再次执行命令:sudo install xxxx,会发现不会出现“is not in the sudoers file”了。

怎样添加sudo|is not in the sudoers file
猜你喜欢