0

I want to know which exact installed package that allows a program to run, I used locate <program_name> command, but that seems to throw all related files a directories that contains that program_name. Is there a better way in Centos8 to list only that package responsible for that program?

2

Yes, you can find out which package provides a specific binary using rpm -q --whatprovides:

$ rpm -q --whatprovides /usr/bin/ls
coreutils-single-8.30-8.el8.x86_64

To determine the binary providing a given command, use command -v:

$ command -v ls
/usr/bin/ls
1
  • Yes, it does what I need. Thanks – otto_ Jan 12 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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