sudo command not found

In this troubleshooting guide we learn how to fix sudo command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

sudo: command not found

or when using sudo you get the following error message

sudo: sudo: command not found

Solutions to sudo: command not found

How To Fix sudo: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu sudo is provided by sudo package.

sudo is:

Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.

This version is built with minimal shared library dependencies, use the sudo-ldap package instead if you need LDAP support for sudoers.

To fix this problem, we can install more using the command below.

sudo apt-get -y install sudo

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install sudo.

sudo apt -y install sudo

Or if you have aptitude installed you can use the following command.

sudo aptitude install sudo

Summary

In this tutorial we learn how to fix sudo command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.