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”.

sudo command not found error

Here is how you can fix “sudo command not found” error in Debian.

  1. 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.
su command

2. Update your repositories using the below command.

apt update
updating your repositories

3. After finishing the update, install the sudo utility using the below command.

apt install sudo
installing the sudo utility

Also Read: How to Display Asterisks When Typing Sudo Password in Linux Terminal

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.

sudo error

4. Run the command “visudo” while being root.

visudo command

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

Editing sudoers file

Now switch to a regular user account and try to run “sudo” command to install a package or update the system.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *