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:
DESKTOPDOWNLOADTEMPLATESPUBLICSHAREDOCUMENTSMUSICPICTURESVIDEOS
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 ๐
xdg-user-dirs-update(1)โ the one that actually creates the file, iykyk
๐ 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
- 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