How to Fix the "sudo: command not found" Error on LinuxHow to Fix the "sudo: command not found" Error on Linux

How to Fix the “sudo: command not found” Error on Linux

sudo is installed by default in most of the Linux but this might not be the case on all distros. If sudo is not installed in the Linux distro that you are using then you will receive the error, “sudo: command not found” when you attempt to run a command using sudo.

How to Fix the “sudo: command not found” Error on Linux

You don’t need to worry as we have simple solution for this. Run the following command in your Linux to install Sudo command or tool:

On Debian-based systems:

apt install sudo

Then, add your user to the sudo group with the following command:

usermod -aG sudo your_username

On Arch-based systems,:

pacman -S sudo

Then, run the following to add the user to the wheel group:

usermod -aG wheel your_username

On Fedora and other RHEL-based distros, run the following command to install sudo :

dnf install sudo

Then, add your user to the sudo group by issuing the following command:

usermod -aG wheel your_username

At this moment, you have now successfully installed sudo and added your user to the sudo group. So you wont have any problem now while running sudo command in your Linux operating system.

READ More Relevant Stuff:  Wine 6.0 Released, Download Your Copy Now

Leave a Reply

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