XDG Base Directory shell scripting tutorial

According to the XDG Base Directory Specification, Linux applications should store their data in one of three locations according to the type of data( $HOME/.cache/, $HOME/.config/, or $HOME/.local/share/). Applications should discover this location by reading environmental variables, or falling back to a predefined set of default paths only if these variables aren’t set in the environment. This tutorial teaches you how to follow the XDG Base Directory Specification in your shell scripts.