$HOME/.config directory is part of the XDG Specification and is determined by the value of
Theoretically, this means that if you want your configuration files stored somewhere else you just need to set
$XDG_CONFIG_HOME to that preferred location.
In practice, however, you may well find instances of software that blindly writes to
$HOME/.config/... rather than following the XDG Specification. Particularly as it's not a required part of any distribution.
For applications that do follow XDG, you can also have a set of directories (
$XDG_CONFIG_DIRS colon separated, like
$PATH) that define other locations from which default values should be sourced. The default value for this should be
Now, the next question that should be on your lips is, "OK, so where do I set
$XDG_CONFIG_HOME?" and unfortunately this gets rather complicated.
The summary seems to be that you will probably get away with putting it in
.bashrc), but that a global configuration via PAM might be required. Personally I've not tried this, and in particular I don't see how a
.profile based solution could work with a GUI-based login environment.
The second question might then be "How do I move my configuration to this new location?", which is also fraught with potential issues. Sigh.
The easiest option here is probably to use a symbolic link that points
$HOME/.config to your preferred location. This handles not only any issues with setting
$XDG_CONFIG_DIR but also any issues with applications that insist on looking directly under
test -d .config && mv .config .config_old
ln -s /path/to/preferred_config_dir .config