As we linux users know that Sudo command by default installed in Linux. If in case it is shows you sudo command not found than you have to follow this guide to fix this issue.

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

There are no need to worry about your desktop or laptop you dont need to reinstall ubuntu or linux distro you can fix sudo command not found error very simple steps.

  • apt install sudo

Then add your user to the sudo group with 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 just replace your computer user name that laptop or dektop has name.

Leave a Reply

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