DD. Asked: 2012-04-13 05:43:16 +0800 CST2012-04-13 05:43:16 +0800 CST 2012-04-13 05:43:16 +0800 CST Linux app config location 772 Where is the appropriate place in the standard linux hierarchy to put config files for my apps? linux filesystems 3 Answers Voted Best Answer Khaled 2012-04-13T05:51:26+08:002012-04-13T05:51:26+08:00 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. Jeff Ferland 2012-04-13T05:47:10+08:002012-04-13T05:47:10+08:00 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. adaptr 2012-04-13T06:24:31+08:002012-04-13T06:24:31+08:00 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/*.
The system-wide config dir is
/etc
, but it is common to have relativeetc
dir within the standalone application. This depends on which one makes sense more for your case.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.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/*.