USER-DIRS.DIRS(5)
๐ user-dirs.dirs(5) โ the manual page, but make it make sense ๐
okay so bestie, buckle up, because this is the <pink>user-dirs.dirs</pink> page from section 5 (File Formats) of the manual, and we're gonna get into it. it's short, it's sweet, it's giving "little file, big job" energy โจ
๐ธ NAME ๐ธ
user-dirs.dirs โ the settings file for your XDG user dirs, no cap ๐
๐ฆ DESCRIPTION ๐ฆ
okay so. the file $HOME/.config/user-dirs.dirs is a plain text file, and inside it lives the <purple>user-specific values</purple> for the XDG user dirs. that's it, that's the whole vibe ๐
and here's the thing โ you don't really write this one by hand, bestie. it gets <hotpink>created and updated</hotpink> by the xdg-user-dirs-update command. it's the main character of that command's whole storyline, honestly ๐
this file is just lines, and every line is shaped like this:
XDG_NAME_DIR=VALUE
literally that's the pattern. XDG_NAME_DIR=VALUE. iconique. periodt.
now, the <mint>names</mint> it actually recognises are these eight, and yes you should memorise them, iykyk:
DESKTOPDOWNLOADTEMPLATESPUBLICSHAREDOCUMENTSMUSICPICTURESVIDEOS
so, VALUE? it's gotta be in one of these two shapes or it's not invited to the party ๐
"$HOME/Path""/Path"
and <yellow>lines beginning with a # character are ignored</yellow> โ those are your lil comments, your little "not me, just vibes" lines sitting there being skipped ๐
okay and here's the genuinely iconic design choice, and I'm obsessed: the format of user-dirs.dirs is <rainbow>designed to allow direct sourcing of this file in shell scripts</rainbow>. like. you can just source it. straight in. no parsing gymnastics, no weird pre-processing, it just works. the way that file was built for shell scripts from day one. we love a forward-thinking queen ๐ซถ
๐ ENVIRONMENT ๐
XDG_CONFIG_DIRSโ aww okay so this one's where theuser-dirs.defaultsfile is located. the default for it is/etc/xdg. so if you don't set anything, that's where the defaults party lives ๐
๐ฅ SEE ALSO ๐ฅ
xdg-user-dirs-update(1)โ the actual command that writes this file, go read that one next bestie, it's the prequel ๐
๐ AUTHOR ๐
Alexander Larsson <alexl@redhat.com> โ Developer ๐
like, thank you for this file, honestly. king behavior.
and that's a wrap! this lil gem is documented by <pink>XDG</pink> and the page is dated <lavender>04/08/2026</lavender> โ so go forth, source your dirs file, and stay slay ๐
โจ๐๐ฆ
๐ฆ where this page comes from
- arch rolling: xdg-user-dirs 0.20-1 ยท GPL-2.0-or-later
- nixpkgs unstable: xdg-user-dirs 0.20
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms