Does Linux/Unix have a unified location for Application files, like "~/Library/Application Support" on Mac OS X? I'm making a Python script that will need to store permanent but changing data, and I want it to work universally.


2 Answers 2


Have a look at the XDG Base Directory Specification. In your case it should probably be $XDG_DATA_HOME:

$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

Please note: if you are writing a daemon you should use something like /var/lib/ or /var/cache/ to save your data.


Unfortunately there's pretty much no standard for user-specific configuration on linux systems...

Many apps will use a directory like ~/.vim, some will use ~/.config/openbox, some will use ~/.local/share

Really it doesn't matter at all as anything in the home directory will work, it's just that it can get pretty messy, but I'd recommend either the first or the second styles personally.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .