Depends what your application is.
If it is the usual F/LOSS, then global config goes under /etc/
, per-user goes under $HOME/
. As per convention, config files under $HOME
have the same name as under /etc/
but start with .
- that means they are hidden and do not show up (ls
) unless you tell to specifically show them (ls -a
, ls -A
). If you have multiple configs, then use subdirectory under /etc/
or $HOME
(again with the .
). Check for example what Debian Policy Manual says about that.
If this is some commercial application which is going to be installed manually/semi-automatically somewhere under /opt/<progname>
, then put the configs (you would likely have only global ones) under /opt/<progname>/etc
. General rule in the case is to mimic the usual *NIX hierarchy (except for $HOME
), but rooted under your /etc/<progname>
subdirectory.
Also note that Windows-style .ini files are not very well accepted on *NIX systems: it is hard to work with them from command line. If possible, use the properties-style config file. E.g. the config you have quoted above would look like:
DEFAULT.somevar = blablabla
DEFAULT.othervar = blebleble