This tutorial let you to fix : sudo after debian installation is missed.
-bash: sudo: command not found
1. Start debian in recovery mode (in Grub boot menu choose : Advanced options for Debian GNU/Linux)
2. Activate or reset root password with this command :
passwd root
and then enter your new root password
after that reboot recovery mode with this command :
reboot
3. After reboot, in Grub menu : choose Debian GNU/Linux with normal mode (NOT rescue mode)
4. in gnome desktop open terminal and enter this command line to login with root
su
5. Install sudo :
apt-get install sudo
6. Add your username to sudo group :
adduser yourusername sudo
now add your username to this file :
nano /etc/sudoers
then search for line with "%sudo ALL=(ALL:ALL) ALL" after this line put :
yourusername ALL=(ALL:ALL) ALL
exit file & save (ctrl+x then y)
7. now enter in terminal :
exit
to exit root to your defaut username
8. test with any command with sudo like : sudo apt-get install htop and enter your password now should sudo works
:-)
No comments:
Post a Comment