{
    "mode": "man",
    "parameter": "xdg-user-dir",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/xdg-user-dir/1/json",
    "generated": "2026-06-16T05:55:13Z",
    "synopsis": "xdg-user-dir [NAME]",
    "sections": {
        "NAME": {
            "content": "xdg-user-dir - Find an XDG user dir\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xdg-user-dir [NAME]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "xdg-user-dir looks up the current path for one of the special XDG user dirs.\n\nThis command expects the name of an XDG user dir as argument. The possible names are:\nDESKTOP\nDOWNLOAD\nTEMPLATES\nPUBLICSHARE\nDOCUMENTS\nMUSIC\nPICTURES\nVIDEOS\n",
            "subsections": []
        },
        "FILES": {
            "content": "The values are looked up in the user-dirs.dir file. This file is created by the\nxdg-user-dirs-update utility.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "The XDGCONFIGHOME environment variable determines where the user-dirs.dirs file is located.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "xdg-user-dirs-update(1)\n\n\n\nXDG                                                                                  XDG-USER-DIR(1)",
            "subsections": []
        }
    },
    "summary": "xdg-user-dir - Find an XDG user dir",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "xdg-user-dirs-update",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xdg-user-dirs-update/1/json"
        },
        {
            "name": "XDG-USER-DIR",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/XDG-USER-DIR/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Retrieve XDG user directory locations.",
        "examples": [
            {
                "description": "Display the home directory for the current user",
                "command": "xdg-user-dir"
            },
            {
                "description": "Display the location of a user directory",
                "command": "xdg-user-dir {{DESKTOP|DOWNLOAD|TEMPLATES|PUBLICSHARE|DOCUMENTS|MUSIC|PICTURES|VIDEOS|...}}"
            }
        ]
    }
}