5

I just installed Arch Linux on my machine, but many of the commands simply don't work. Those that work are the very basics, such as cd and ls, but things like visudo are not found.

1 Answers1

6

The visudo command is provided by the sudo package, which is not part of a base install of Arch Linux. If you installed the base-devel package group, then you should have it.

The base package group contains just slightly more than the minimum possible to get a system running (it does, for example, give you two text editors). Beyond this, you will almost certainly have to install additional packages to make the system meet your needs.

This might be seen as an inconvenience upfront, but it makes for a cleaner system since you don't need to have things installed that you won't use.

In order to determine which package contains a program called foo, you can generally use:

pacman -Fy # update the database
pacman -Fo /usr/bin/foo

You might also find use from

pacman -Fs foo

This searches for packages that own any file named foo rather than just /usr/bin/foo. See pacman(8) for more details.

Fox
  • 8,193
  • The -Fo argument only works with files you have installed. To search for files/program not installed you should use -Fs instead. E.g. pacman -Fs visudo. – Christer Jan 20 '19 at 11:18
  • 1
    @Christer That is false. -Qo is for installed things. (Just tested on my machine to make sure) – Fox Jan 20 '19 at 11:54
  • 1
    Ah yes, you are totally right. I confused -Fo with -Qo. -Fs is still a nice alternative when locating a missing program. – Christer Jan 20 '19 at 12:00
  • @Christer That I'll agree with. I originally mentioned it, then removed it for simplicity – Fox Jan 20 '19 at 12:09