Answers:
运行sudo
命令后,~/.sudo_as_admin_successful
将创建文件,并且警告将消失。因此,要么运行sudo命令(例如),sudo apt-get update
要么~/.sudo_as_admin_successful
手动创建文件:
touch ~/.sudo_as_admin_successful
如果出于任何原因要返回警告,请删除~/.sudo_as_admin_successful
:
rm ~/.sudo_as_admin_successful
小牛?注释掉:sudo vim /etc/bash.bashrc
。本节评论:
# sudo hint
# if [ ! -e "$HOME/.sudo_as_admin_successful" ]; then
# case " $(groups) " in *\ admin\ *)
# if [ -x /usr/bin/sudo ]; then
# cat <<-EOF
# To run a command as administrator (user "root"), use "sudo <command>".
# See "man sudo_root" for details.
#
# EOF
# fi
# esac
# fi
查找要启动的文件:
$ sudo grep -R "man sudo_root" /etc
结果:
/etc/bash.bashrc: See "man sudo_root" for details.
然后滚动输出,直到看到哪个文件包含“ man sudo_root”。