Need to know where a library or other file came from? Here are some I’ve used:
Redhat/SUSE/Fedora
# rpm -qf /path/to/file
Ubuntu/Debian
apt-file search /path/to/file
You may need to install by doing this (as root):
# apt-get install apt-file # apt-file update
FreeBSD
If you are using the new pkgng:
pkg which /path/to/file
or if you are still using the old pkg_ tools:
# pkg_info -W /path/to/file
Gentoo / Funtoo
# equery belongs /path/to/file
Your distribution not included here? Usually you can just do a web search for something like “redhat which file package belong” without quotes to find it for a particular distro.