Interview Prep/Linux/Packages, Shell & Text Tools

How do you find which package provides a file or command?

BeginnerConceptPackages, Shell & Text Tools
Answer
dpkg -S /usr/bin/dig          # installed, Debian
apt-file search bin/dig       # not installed (needs apt-file update)
rpm -qf /usr/bin/dig          # installed, RHEL
dnf provides '*/bin/dig'      # not installed
All Linux questions Roadmap: Linux

More on Packages, Shell & Text Tools