
Sudo also called “superuser do” is a command in Linux that allows you to run high-privilege admin commands as a root user. It asked to enter your personal password and confirms your requests by checking a sudoers file.

After a fresh Debian 10 installation, you could not execute the privileges tasks by running the sudo command. You will get the error ‘sudo command not found in Debian 10′. The reason for this error is the sudo command isn’t included in Debian 10 by default.
In this post, we will show you how to fix sudo command not found in Debian 10 VPS.
Table of Contents
Prerequisites
- A fresh Debian 10 VPS.
- Access to the root user account.
Verify Sudo Error
First, log in to your Debian 10 VPS with root user using the SSH command:
After login, run the following command to verify the sudo error:
You should get the following error:
Install the sudo command
By default, sudo package is included in the Debian 10 default repository. You can install it using the apt-get command as shown below:
The above command will install a sudo command and create a /etc/sudoers file.
Add an User to the Sudo Group
After installing the Sudo package, you will need to create a new regular user and add it to the sudo group.
First, create a new user using the following command:
Output:
Next, add your newly created user to the sudo group:
This command will grants sudo privileges to the user1 and allow it to use the sudo command to perform administrative privileges.
Next, verify whether the user has been added to the sudo group using the following command:
You should see that the user user1 belongs to two groups: user1 and sudo.
Now, switch the user to user1 and execute any command using the sudo:
We hope you are now able to fix the sudo command not found error in Debian 10 VPS.
Of course, you don’t have to fix the sudo error if you use one of our Managed VPS Hosting services, in which case you can simply ask our expert Linux admins to install fix the sudo error on Debian 10 VPS, for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to fix the sudo error on Debian 10 VPS, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Thanks for your precious help.