Hi all,

 

Hope you’re doing good.

 

Sometimes we need to install some packages on Linux. Sometimes we already know what are the packages, sometimes we only knows what is the file provided by package, but without knowing the package name.

 

YUM utility is a the one used to install packages. For example, If I want to install httpd package:

 

yum install httpd

 

But let me say that I don’t know what is the package name, but I know what is the file created by package. How can I know the name of package?

 

Simple:

 

yum provides /etc/httpd/conf/httpd.conf

 

An output like that will appear for you:

 

httpd-2.4.6-17.el7.x86_64 : Apache HTTP Server

Repo        : rhel-7-server-rpms

Matched from:

Filename    : /etc/httpd/conf/httpd.conf

 

Great! So you know that the name of package that contains the file searched is httpd!

 

Hope that helps,

 

Peace!

Vinicius