XDG-USER-DIR(1)

๐Ÿ’ซ NAME ๐Ÿ’ซ

xdg-user-dir โ€” bestie's lil helper for finding one of your XDG user dirs โœจ

(oh also hiii, this is a page from the User Commands manual, section 1, and it's gonna be so chill i promise ๐Ÿซถ)


๐ŸŒธ SYNOPSIS ๐ŸŒธ

xdg-user-dir [NAME]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so picture this: you need to know where one of your special XDG user dirs currently lives, and you don't wanna go digging for it yourself. that's literally the whole job of xdg-user-dir โ€” it looks up the current path for one of the special XDG user dirs and hands it to you ๐Ÿ’…

the way it works is you pass in the name of an XDG user dir as the argument, and it goes and finds the path. no cap, that's it.

the possible names you can ask for are these iconic legends right here:

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

like, one of those. those are your options, bestie ๐Ÿฆ‹


๐Ÿ—‚๏ธ FILES ๐Ÿ—‚๏ธ

where does it actually look? the values get looked up in the user-dirs.dirs file ๐Ÿ”ฅ

and who makes that file? not you, don't worry โ€” it's created by the xdg-user-dirs-update utility. so like, that's the main character that actually writes it, and xdg-user-dir is just reading the tea ๐Ÿ“


๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

the XDG_CONFIG_HOME environment variable is the one that decides where the user-dirs.dirs file is located. so if you moved that around, that's the vibe that matters ๐Ÿ‘‘


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


๐Ÿ’– AUTHOR ๐Ÿ’–

Alexander Larsson <alexl@redhat.com> โ€” Developer ๐ŸŒŸ


and that's the whole page, bestie, we ate that up โญ this beauty is from XDG, version/date 04/08/2026 โ€” mwah, go find your folders ๐Ÿ’œ๐Ÿงšโ€โ™€๏ธ

๐Ÿ“ฆ where this page comes from