Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Where is the appropriate place in the standard linux hierarchy to put config files for my apps?

share|improve this question
Filesystem Hierarchy Standard indicates either /etc/ or /etc/opt/<subdir> may be appropriate given the nature of your application and/or distribution. – jscott Apr 12 '12 at 13:45
up vote 3 down vote accepted

The system-wide config dir is /etc, but it is common to have relative etc dir within the standalone application. This depends on which one makes sense more for your case.

share|improve this answer
Is there a reason why he wouldn't put it in usr/local/bin? I just look as /etc as the directory that contains only config files for the system. I look at apps & their config files as something that would make more sense in /usr/local/bin since that's where software & other files are located for using on the local machine. – Ethabelle Apr 12 '12 at 14:21
bin dir should contain binary files/scripts. It should work regardless of the directory you put your config files in. The point is just about organizing your files. – Khaled Apr 12 '12 at 14:34

Is your config system-wide? Files in /etc or your own subdirectory in there if you have a few of them.

Is your config per-user? The $HOME/.your_file or $HOME/.your_directory/ if you have a few of them.

share|improve this answer
or $HOME/.config/ – Tom O'Connor Apr 12 '12 at 13:54

What are "my apps"? Are these applications you develop, deploy, or test ?

In that case, your $HOME is completely free for you to use; existing applications often use $HOME/.appname/ as a config and/or storage directory.

For system-wide installed apps, the standard is /usr/local/etc/appname if you installed the app in /usr/local/*.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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