Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

From a developer's perspective. Should I use a text-based config in /etc or in $HOME? Or something else?

share|improve this question
I lack the expertise to know whether they would be preferred or not, but GConf and dconf are other ways to store application settings. – Firefeather May 13 '11 at 21:17
Thanks for the suggestion. Personally, I prefer plain files because I have nightmares about the registry of windows. In my opinion the ideal way of storing settings is plain text files, preferably with a standard format (INI, JSON, XML, YAML etc.). A single database (especially dconf which is monolithic) is a single point of failure. – Tamás Szelei May 14 '11 at 13:20
ás: Thanks for sharing: I learned some new things from your comment that will come in handy if I ever get around to writing some software of my own! – Firefeather May 17 '11 at 18:33
I'm glad it helps you :) – Tamás Szelei May 17 '11 at 18:56
Related :… – Tachyons Oct 5 '12 at 14:59
up vote 11 down vote accepted

If you are talking about a system wide daemon, a file in /etc is appropriate. If you are talking about an application that should have per-user settings, the home directory is appropriate. For new apps, it would be a good idea to follow the XDG Base Directory specification:

This basically states that you should store your config files in $XDG_CONFIG_HOME, which defaults to ~/.config

share|improve this answer
Why no mention of dconf/gsettings? – Seth Apr 2 '15 at 22:21

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.