22

I've come from Fedora and am trying out Arch Linux.

I was wondering if the packager 'pacman' contains functionality like that provided by 'yum whatprovides':

provides or whatprovides
              Is  used  to  find out which package provides some feature or file. Just use a specific name or a file-
              glob-syntax wildcards to list the packages available or installed that provide that feature or file.
1
  • 1
    Not sure if you still use Arch, but you might consider changing the accepted answer to one of the other two answers since this is now built in to pacman. Mar 5, 2022 at 19:52

3 Answers 3

12

pacman -F file_name for Pacman v5.2.1 - libalpm v12.0.1

2
  • 2
    Don’t forget to run pacman -Fy as root prior to running this command to download fresh package databases from the server. Jan 14, 2022 at 8:54
  • 1
    Perhaps better to just use pacman -Fy file_name as recommended in VasyaNovikov's answer, at least if you use it infrequently. After the first use, of course, you can resort to pacman -F file_name, but as @tukusejssirs noted, you should still update the database every so often. Mar 5, 2022 at 19:48
12

I believe pkgfile or pkgfile -s are what you're looking for. For further reference I will direct you to here. The link will show you what other commands you might need a translation for. I hope it helps.

1
  • and for local installed packages should be pkgfile -U
    – dag729
    Jan 14, 2010 at 17:10
6

You can also use pacman -Fy file_name, as suggested in this Unix & Linux Stack answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.