Phillipus
Phillipus

Reputation: 111

Arch Linux sudo: command not found

I recently installed Arch Linux on my Raspberry Pi and, after logging in as root and creating myself a user account I tried to use the sudo command. This was the result:

[phillipus@alarmpi home]$ sudo mkdir Public
bash: sudo: command not found

After searching for the problem, I logged in as root and executed pacman -S sudo. This was followed by a long output and a confirmation of installation. Following this, I retried to use sudo both as root and as my user, both times getting the same response. Following another solution to the problem, I tried to add myself to /etc/sudoers, only to find out that it didn't exist.

I am not very experienced with Linux, so could you please try to explain your responses fully?

Upvotes: 11

Views: 34185

Answers (2)

mobal
mobal

Reputation: 352

First, you need to install the sudo package to use sudo:

pacman -S sudo

After that, you need to edit the sudoers file and add your username to it.

Upvotes: 19

user2908819
user2908819

Reputation:

You can add yor user to the wheel group using usermod -G wheel yourusername and uncomment the %wheel ALL=(ALL) ALLline in the sudoers file. For more information, have a look at Sudo - ArchWiki

Upvotes: 2

Related Questions