How to find which package certain command belongs to on CentOS?
--------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Techno Bleepage Open
--
Chapters
00:00 Question
00:53 Accepted answer (Score 17)
01:05 Answer 2 (Score 28)
01:20 Answer 3 (Score 10)
01:54 Answer 4 (Score 1)
02:15 Thank you
--
Full question
https://superuser.com/questions/467186/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #commandline #centos #packagemanagement
#avk47
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Techno Bleepage Open
--
Chapters
00:00 Question
00:53 Accepted answer (Score 17)
01:05 Answer 2 (Score 28)
01:20 Answer 3 (Score 10)
01:54 Answer 4 (Score 1)
02:15 Thank you
--
Full question
https://superuser.com/questions/467186/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #commandline #centos #packagemanagement
#avk47
ANSWER 1
Score 29
Ubuntu / Debian example to check the package of the free
command:
dpkg -S $(which free)
ACCEPTED ANSWER
Score 19
Query the rpmdb.
rpm -qf $(which free)
ANSWER 3
Score 11
For CentOS, how about yum provides?
Use
which free
to find out where it is
For me it's at
/usr/bin/free
So then you can run
yum provides /usr/bin/free
and it will tell you which package has it
ANSWER 4
Score 1
For all red-hat based distributions you can use yum package management utility
yum provides `which free`
provides argument specifies which package provides certain feature or file.