Just curious if there is a standard way of locating where a package puts the config files for a program (assuming the documentation for the package doesn't include this information).

The reason way I ask is because I was trying to install flow-tools on centos. There isn't a package in any repositories and I was frustrated building it from source because I couldn't find where it put the config file.

From what I have read online, installed with apt-get the config is apparently here /etc/flow-tools/flow-capture.conf. This file wasn't created when I used make to install the package on centos.

So following what this guy did I downloaded an rpm most relevant for my release and installed it:

sudo wget http://dl.fedoraproject.org/pub/epel/6/x86_64/flow-tools-
rpm -Uvh flow-tools- --nodeps
yum install flow-tools

Later in his little how to he edits the configuration file for the installed flow-tools which is located here: /etc/sysconfig/flow-capture

How did he know that's where the config file is? I was not able to locate this information myself for both the package I downloaded and the source files installed with make.

2 Answers 2


Use rpm's query command with the configfiles option:

rpm -qc flow-tools
  • This worked great. Now should I expect all rpm packages to support this or will I often find packages that don't make their config file known in this way? Sep 30, 2015 at 12:43
  • I can't speak for every package; the configfiles query option uses the information provided by the spec file's %config directive, so if the package builder provides that information, you can query it.
    – Jeff Schaller
    Sep 30, 2015 at 13:10
  • But in your experience is it usually available or do you run across packages that weren't setup this way? Sep 30, 2015 at 14:20
  • 1
    For what it's worth, of the 756 packages installed on a randomly-chosen system I manage (a RHEL 6 "Basic Server"), 183 packages had configfiles defined (573 did not).
    – Jeff Schaller
    Sep 30, 2015 at 15:17

For any .rpm file, run rpm -qlp youpakage.rpm. So for your rpm file, run

rpm -qlp flow-tools-


rpm -qlp http://dl.fedoraproject.org/pub/epel/6/x86_64/flow-tools-

and you'll see /etc/sysconfig/flow-capture in the list.

From man rpm

-q -- query

-p, --package PACKAGE_FILE Query an (uninstalled) package PACKAGE_FILE. The PACKAGE_FILE may be specified as an ftp or http style URL, in which case the package header will be downloaded and queried. See FTP/HTTP OPTIONS for information on rpm’s internal ftp and http client support. The PACKAGE_FILE argu- ment(s), if not a binary package, will be interpreted as an ASCII package manifest unless --nomanifest option is used. In manifests, comments are permitted, starting with a ’#’, and each line of a package manifest file may include white space separated glob expressions, including URL’s, that will be expanded to paths that are substituted in place of the package manifest as additional PACKAGE_FILE arguments to the query.

-l, --list List files in package.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .