Original link: http://sharadchhetri.com/2013/08/07/sudo-command-not-found-debian-7/
To solve this issue install sudo in Debian,follow the given below steps
Step 1:first you has to become super User (root)
-
Step 2:now install sudo with the help of command Apt-get
Apt-get install sudo
Step 3:now Check the sudo
[Email protected]:~# ExitLogout[Email protected]:~$ sudo su-WeTrust you have received the usual lectureFromTheLocal SystemAdministrator. ItUsually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) with great power comes great responsibility. [sudo] password for Linux: Linux is not in the sudoers file< Span class= "pun". this incident would be Reported.[email protected]:~$
Note:user name Linux is not listed in sudoers file hence to allow the user called Linux to use "sudo su-". We'll edit the sudoers file
Important note:with sudoers file can also specify which particular commands a particular user or group can use.
Step 4:allowing user to use "sudo su-"
Because in my system user called Linux is first user. I want to give access of the super user to this account.
Switch to Superuser root
[Email protected] : ~-Password:[email protected]: ~#
Edit The/etc/sudoers file:append The below given line in Sudoers file.
Replace the user name called Linux with your user name. Save and exit
/etc/sudoerslinux All= (all:all) All
Step 5:now Recheck. Exit from console and login with user and use the command sudo su–
[email protected] :~# exitlogoutyou< Span class= "PLN" > have mail in /var/mail/linux[email Protected]:~$ sudo su - [sudo] password for: [email protected]:~#
Sudo is not available in Debian