$linuxjunkies
>

XDG shell

also: XDG Base Directory Specification, XDG compliance

XDG shell is a shell that follows the XDG Base Directory Specification, storing user configuration and data in standardized directories like ~/.config and ~/.local rather than cluttering the home directory with dotfiles.

XDG shell refers to a shell implementation that adheres to the XDG Base Directory Specification, a freedesktop.org standard that defines where applications should store their configuration files, data, and cache. Instead of scattering dotfiles throughout your home directory, XDG-compliant shells use organized subdirectories.

For example, an XDG-compliant shell might store its configuration in ~/.config/shell/config and history in ~/.local/share/shell/history, rather than in files like ~/.bashrc or ~/.zshrc. This keeps the home directory cleaner and more organized, making it easier to manage and back up application settings.

Most modern shells like zsh and fish support XDG paths, though they typically maintain backward compatibility with traditional dotfile locations. Some shells allow you to explicitly configure which directories to use through environment variables like $XDG_CONFIG_HOME and $XDG_DATA_HOME.

Related terms