concept

XDG Base Directory

XDG Base Directory is a specification that defines standard locations for storing user-specific configuration, cache, data, and runtime files on Unix-like systems. It aims to reduce clutter in the home directory by organizing files into well-defined subdirectories, promoting cleaner and more portable application behavior. The specification is maintained by freedesktop.org and is widely adopted by Linux desktop environments and applications.

Also known as: XDG, XDG Base Dir, XDG Base Directory Specification, XDG User Directories, freedesktop.org Base Directory
🧊Why learn XDG Base Directory?

Developers should learn and use XDG Base Directory when creating applications for Unix-like systems to ensure compliance with modern desktop standards and improve user experience. It is essential for applications that store configuration, cache, or data files, as it helps avoid polluting the home directory and enhances cross-platform compatibility. Use cases include GUI applications, command-line tools, and system services that need persistent storage in a standardized way.

Compare XDG Base Directory

Learning Resources

Related Tools

Alternatives to XDG Base Directory