Many newbie may panic in this error when they try to ssh into a new server via command line or when they are trying CLI (Command Line Interface) for the first time.
-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 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.
Now, install sudo.
apt install sudo
Now exit and back to normal user.
now you will back to normal user again.
Now try to run sudo command, it will run normally.