0

Somehow I do not have sudo on my PC anymore, perhaps I may have uninstalled it somehow? I pasted this into my terminal earlier:

 sudo rm osbuddy sudo nano osbuddy

And now it seems sudo is not there anymore.

When I write sudo, the terminal outputs

Command 'sudo' not found, but can be installed with:
sudo apt install sudo

Obviously this does not work since when I write sudo apt install sudo

The sudo command is not found of course.

If I just write apt install sudo

It says that I need to be root. What do I do?

4
  • 1
    sudo rm osbuddy sudo nano osbuddy means DELETE osbuddy AND sudo AND nano AND osbuddy. If you want to chain multiple commands, user a separator like ; or &&
    – cmak.fr
    Mar 9, 2019 at 9:16
  • nano was not deleted though
    – user825380
    Mar 9, 2019 at 9:18
  • 1
    was not in current path...
    – cmak.fr
    Mar 9, 2019 at 9:27
  • The best answer seems to be this: askubuntu.com/a/434530/69802
    – kebs
    May 12, 2020 at 9:22

1 Answer 1

1

How to repair:

Enter recovery mode:
Press & hold shift key while bios starts (See more)

Select Menu network
Will enable the network

Select Menu root
Will open a root shell

Type some commands:

dpkg-reconfigure sudo
apt install sudo
reboot

This should repair sudo

0