Sudo: Command Not Found

Published in

on

Many newbies may panic in this error when they try to ssh into a server via command line or when they are trying CLI (Command Line Interface) for the very first time. Don’t panic, if you are here means your issue is solved.

-bash: sudo: command not found

Let’s see what is this and how to fix it.

What Is This Error?

The system is prompting that sudo command is not there in system to run.

It happens when the system is installed with minimal run version. Or installer is used on very low resource system with minimal resources. By default Debian doesn’t install sudo application when the system is installed with minimum package.

What Is the Solution to This Error?

Simple, just switch to root user and install sudo. That’s it.

If you are a regular user, then switch to root user.

su -

Now, install sudo.

apt install sudo

Now exit and back to normal user.

exit

Now you will be back to normal user again. Now try to run sudo commands, it will run normally.

Leave a Reply

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