LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xdg-user-dir

Find an XDG user directory path

TLDR

Show home directory (default with no argument)
$ xdg-user-dir
copy
Show the Downloads directory path
$ xdg-user-dir DOWNLOAD
copy
Show the Documents directory path
$ xdg-user-dir DOCUMENTS
copy
Show the Desktop directory path
$ xdg-user-dir DESKTOP
copy

SYNOPSIS

xdg-user-dir [DIRECTORY]

DESCRIPTION

xdg-user-dir looks up the current path for an XDG user directory as defined in the user-dirs.dirs configuration file. These are the standard directories for common content types like documents, music, and downloads.The paths are configured in ~/.config/user-dirs.dirs and can be customized per user. The XDG_CONFIG_HOME environment variable determines where the configuration file is located.

PARAMETERS

DESKTOP

Desktop directory
DOWNLOAD
Downloads directory
DOCUMENTS
Documents directory
MUSIC
Music directory
PICTURES
Pictures directory
VIDEOS
Videos directory
TEMPLATES
Templates directory
PUBLICSHARE
Public share directory
--help
Display help and exit
--version
Show version information and exit

INSTALL

sudo apt install xdg-user-dirs
copy
sudo dnf install xdg-user-dirs
copy
sudo pacman -S xdg-user-dirs
copy
sudo apk add xdg-user-dirs
copy
sudo zypper install xdg-user-dirs
copy
nix profile install nixpkgs#xdg-user-dirs
copy

CAVEATS

Returns home directory if the requested directory is not configured or if an unknown directory name is given. Directory paths may not exist on the filesystem.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid