How to find which package provides a file in Linux Mint?

How to find which package provides a file in Debian based releases, such as Linux Mint, Ubuntu?

You can use dpkg:

dpkg -S /path/to/the/file

Or for a command file such as ps2pdf:

dpkg -S `which ps2pdf`
Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

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