Remove note about sudo that appears when opening the terminal

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:

rm ~/.sudo_as_admin_successful

Maverick? Comment it out: sudo vim /etc/bash.bashrc. The section, commented:

# 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

Finding the file to start:

$ sudo grep -R "man sudo_root" /etc

The result:

/etc/bash.bashrc:   See "man sudo_root" for details.

and then scroll though the output until you see which file contains "man sudo_root".


This should not happen, unless you did not yet run any command using sudo (sudo echo "hello" should be enough).

If you did run a command using sudo and you don't see the file ~/.sudo_as_admin_successful, then you are probably hit by this bug.