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:

  • DESKTOP
  • DOWNLOAD
  • TEMPLATES
  • PUBLICSHARE
  • DOCUMENTS
  • MUSIC
  • PICTURES
  • VIDEOS

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 the user-dirs.defaults file 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