Summery: In this article you can learn how to fix sudo command not found in Debian.
“sudo” is a Linux command which grunt you the permission to execute programs with the security privileges of another user. By default it will give you the “superuser/root” privileges to execute your programs.
After a fresh install of Debian, if you try to install or update your system using command line with sudo command it will prompt you with an error saying that “sudo Command Not Found”.
Here is how you can fix “sudo command not found” error in Debian.
- Switch to the root account using the “su” command. When it prompt you to enter a password, enter the root password you specified during the installation.
2. Update your repositories using the below command.
3. After finishing the update, install the sudo utility using the below command.
apt install sudo
Now we need to add existing user in our machine to sudoers group. if you don’t add user to this group, every time when you run the sudo command it will give an error.
4. Run the command “visudo” while being root.
5. Add the user name together with same privileges as root under user privilege specification section.
Also Read: Best Programming Languages To Learn In 2019
Now switch to a regular user account and try to run “sudo” command to install a package or update the system.