LINUX – Find what package a file belongs

Debian/Ubuntu:

dpkg -S filename
i.e.:
# dpkg -S /etc/gimp/2.0/controllerrc
gimp-data: /etc/gimp/2.0/controllerr
c

to achieve the same thing in RedHat/CentOS distros:
rpm -qf filename
i.e.:
# rpm -qf /etc/httpd/
httpd-2.4.6-40.el7.centos.x86_64

Leave a Reply

Your email address will not be published. Required fields are marked *

20 − 13 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.