← 返回命令列表

Linux command

xdg-user-dir 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

xdg-user-dir

Example

xdg-user-dir DOWNLOAD

Example

xdg-user-dir DOCUMENTS

Example

xdg-user-dir DESKTOP

说明

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.

参数

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

FAQ

What is the xdg-user-dir command used for?

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.

How do I run a basic xdg-user-dir example?

Run `xdg-user-dir` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does DESKTOP do in xdg-user-dir?

Desktop directory