What is the pacman option to search for a package that owns a file? Like
dpkg -S in Debian-based distros.
pacman -Qo <filename>.
% pacman -Qo x86_64-pc-linux-gnu-pkg-config /usr/bin/x86_64-pc-linux-gnu-pkg-config is owned by pkgconf 1.6.3-1
Query Options (apply to -Q)
-o, --owns <file>
Search for packages that own the specified file(s). The path can be relative or absolute, and one or more files can be specified.
From Pacman/Rosetta (adapted from a table):
Query the package which provides FILE
As shown above (and as its name implies), the page presents ways to perform
certain actions in
pacman and their equivalents in other package managers, so
it might be worth checking out when coming from other distributions.