sudo: command not found

On a Debian server, when running a command with sudo, I got the error

To fix this, you need to install “sudo” package. If you are logged in as non-root user, then you need to become root, for this, you can use the command

Enter the root password when it prompt for the password.

Once logged in as user root, you can install sudo with the command

To add a user to sudo group, run the command

Or

adding user to sudo group

If you don’t have a user, you can create a user with the command

To verify if the user has sudo rights, you can use the command “sudo -v”. You can also use “id” or “groups” command, which lists all groups the current user is in, you can verify if the user is part of sudo group.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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