I know there's a which command, that echoes the full name of a binary (e.g. which sh). However, I'm fairly sure there's a command that echoes the package that provides a particular binary. Is there such a command? If so, what is it? I'd like to be able to run this:

commandName ls

and get

coreutils

for example.

link|improve this question

80% accept rate
feedback

1 Answer

up vote 4 down vote accepted

I guess you are looking for the dpkg -S command (also see frequently used options for dpkg).

link|improve this answer
Thank you! dpkg -S `which COMMANDHERE` worked for me. – Delan Azabani May 30 '10 at 7:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.