Ubuntu – About Terminal Problem

gnome-terminal

I have recently joined Ubuntu version 16.04. When i open the terminal it displays this message "To run a command as administrator(user "root"), use sudo command ". Please help me with this problem asap.

It happened to me (@waltinator), too. I did CtrlAltt to open a teminal, and is my wont, did 3 CtrlShiftt to open additional teminal screens. The additional screens got the message:

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

before my .bashrc finished.

I can't find anywhere in my .bashrc or its included files where I attempt to sudo anything (sounds like a Bad Idea) during my login process. I do set up aliases that sudo when evaluated, but not when defining the alias:

$ egrep 'sudo |su ' .bashrc .bash_aliases /etc/profile.d/color_ls.sh etc/bash_path_funcs/* 
.bashrc:# makes "sudo" easier: sudo less $LESS files
.bash_aliases:alias bigopenfiles="sudo lsof / | awk '{if(\$7 > 1048576) print \$7/1048576 \"MB\" \" \" \$9 }' | sort -n -u" 
.bash_aliases:alias deletedfiles="sudo lsof / | egrep 'PID|\(deleted\)'"
.bash_aliases:alias bigopenfiles="sudo lsof / | awk '{if(\$7 > 1048576) print \$7/1048576 \"MB\" \" \" \$9 }' | sort -n -u" 
.bash_aliases:alias deletedfiles="sudo lsof / | egrep 'PID|\(deleted\)'"
.bash_aliases:alias aptfixkey="sudo gpg --keyserver keyserver.ubuntu.com --recv-keys "
.bash_aliases:alias susp="sudo -v && sleep 20 && echo 'Zzzzzzzzzzzzzzzzzzzzz' && date && sudo pm-suspend && date && echo 'Awake'"
.bash_aliases:alias update='wupdatestatus=99;while [[ $wupdatestatus -ne 0 ]] ; do sudo apt-get update; wupdatestatus=$?;echo "status=$wupdatestatus";if [[ $wupdatestatus -ne 0 ]] ; then date; sleep 300; fi; done'
.bash_aliases:alias upgrade='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done'
.bash_aliases:alias upgradedl='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get --download-only upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done'
.bash_aliases:alias dist-upgrade='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get dist-upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done'
.bash_aliases:alias wup='wifi;sudo rmmod rt2800usb;sudo modprobe rt2800usb;nmcli con up id Nick;wifi;ping3 slashdot.org'
.bash_aliases:    sudo tail -n 50 $( ls -rt1 /var/log |sed -e 's%^%/var/log/%'| tail -n 6 )
grep: /etc/profile.d/color_ls.sh: No such file or directory

None of the logs help:

$ sudo grep -l sudo /var/log/* /var/log/*/* 2>/dev/null  

shows nothing interesting.

How do I track down who/what is trying to sudo when I login?

Best Answer

This is just an informational message telling you that in case you want to run a command with root user privileges, you have to use sudo.

Once you ran your first sudo command, this information will no longer appear.

If you don't know what sudo or "root user privileges" are, you probably don't need that at all yet. In case you're still curious, you might start reading about it here though.

To get rid of the message, simply run a sudo command like this:

sudo echo "Hello world"

It will ask you for your account password and then print the string "Hello world" to the terminal as root - which has no real use, but is enough for this case.