$linuxjunkies
>

XDG_CONFIG_HOME

also: XDG specification, XDG Base Directory

An environment variable that specifies the base directory where user application configuration files should be stored, defaulting to ~/.config if unset.

XDG_CONFIG_HOME is part of the XDG Base Directory Specification, a standard that defines where Linux applications should store user-specific data. When set, it tells applications where to look for and store configuration files instead of cluttering the home directory with dot-files.

If XDG_CONFIG_HOME is not explicitly set, applications follow the specification and default to ~/.config. For example, GNOME applications, Firefox, and many modern CLI tools respect this variable.

Example: If you set export XDG_CONFIG_HOME=/home/alice/.myconfigs, an application following the standard will store its config in /home/alice/.myconfigs/appname/ instead of ~/.appname/ or ~/appname.conf.

Related terms