Configuration files for processes with elevated privileges are generally stored in /etc
. Data files for processes with elevated privileges (Web Server, Mail Server, Chat Server, etc.) are generally stored in /var
. And that's where consistency ends. Some folks say you start with the location to store them (/etc
|/var
) then have an appname
sub-folder for your app, then continue from there as necessary.
If you're not a system daemon with elevated privileges, your only consistent choice is a dot directory in the launching user's home directory. I think the Free Desktop Standards (XDG
) specify ~/.config
for per-user configuration, and ~/.cache
for replaceable static and/or generated data you need to save.
Looking at my Home Directory, a few key dot directories I have are:
~/.cache
~/.config
~/.irssi
~/.maildir
~/.mozilla
~/.kde
~/.ssh
~/.vnc
[edit]
While not a syscall, the XDG specifications I reference are at http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html