Ubuntu terminal一直提示使用sudo 执行命令

来源:互联网 发布:淘宝樱花自动铅笔 编辑:程序博客网 时间:2024/04/29 15:12

每次打开Terminal, 窗口上方都会出现
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

解决方法:
Once you run a sudo command, the file ~/.sudo_as_admin_successful will be created and the warning will go away. So either run a sudo command, such as sudo apt-get update or create the ~/.sudo_as_admin_successful file manually:

touch ~/.sudo_as_admin_successful

If you want the warning back for whatever reason, remove ~/.sudo_as_admin_successful

do grep -R “man sudo_root” /etc`

1 0