{
    "mode": "man",
    "parameter": "user-runtime-dir@.service",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/user-runtime-dir%40.service/5/json",
    "generated": "2026-07-05T13:14:14Z",
    "synopsis": "user@UID.service\nuser-runtime-dir@UID.service\n/lib/systemd/systemd-user-runtime-dir\nuser-UID.slice",
    "sections": {
        "NAME": {
            "content": "user@.service, user-runtime-dir@.service, systemd-user-runtime-dir - System units to start\nthe user manager\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "user@UID.service\n\nuser-runtime-dir@UID.service\n\n/lib/systemd/systemd-user-runtime-dir\n\nuser-UID.slice\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The systemd(1) system manager (PID 1) starts user manager instances as user@UID.service, with\nthe user's numerical UID used as the instance identifier. These instances use the same\nexecutable as the system manager, but running in a mode where it starts a different set of\nunits. Each systemd --user instance manages a hierarchy of units specific to that user. See\nsystemd(1) for a discussion of units and systemd.special(7) for a list of units that form the\nbasis of the unit hierarchies of system and user units.\n\nuser@UID.service is accompanied by the system unit user-runtime-dir@UID.service, which\ncreates the user's runtime directory /run/user/UID, and then removes it when this unit is\nstopped.  user-runtime-dir@UID.service executes the systemd-user-runtime-dir binary to do the\nactual work.\n\nUser processes may be started by the user@.service instance, in which case they will be part\nof that unit in the system hierarchy. They may also be started elsewhere, for example by\nsshd(8) or a display manager like gdm, in which case they form a .scope unit (see\nsystemd.scope(5)). Both user@UID.service and the scope units are collected under the\nuser-UID.slice.\n\nIndividual user-UID.slice slices are collected under user.slice, see systemd.special(7).\n",
            "subsections": []
        },
        "CONTROLLING RESOURCES FOR LOGGED-IN USERS": {
            "content": "Options that control resources available to logged-in users can be configured at a few\ndifferent levels. As described in the previous section, user.slice contains processes of all\nusers, so any resource limits on that slice apply to all users together. The usual way to\nconfigure them would be through drop-ins, e.g.\n/etc/systemd/system/user.slice.d/resources.conf.\n\nThe processes of a single user are collected under user-UID.slice. Resource limits for that\nuser can be configured through drop-ins for that unit, e.g.\n/etc/systemd/system/user-1000.slice.d/resources.conf. If the limits should apply to all users\ninstead, they may be configured through drop-ins for the truncated unit name, user-.slice.\nFor example, configuration in /etc/systemd/system/user-.slice.d/resources.conf is included in\nall user-UID.slice units, see systemd.unit(5) for a discussion of the drop-in mechanism.\n\nWhen a user logs in and a .scope unit is created for the session (see previous section), the\ncreation of the scope may be managed through pamsystemd(8). This PAM module communicates\nwith systemd-logind(8) to create the session scope and provide access to hardware resources.\nResource limits for the scope may be configured through the PAM module configuration, see\npamsystemd(8). Configuring them through the normal unit configuration is also possible, but\nsince the name of the slice unit is generally unpredictable, this is less useful.\n\nIn general any resources that apply to units may be set for user@UID.service and the slice\nunits discussed above, see systemd.resource-control(5) for an overview.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "Example 1. Hierarchy of control groups with two logged in users",
                    "content": "$ systemd-cgls\nControl group /:\n-.slice\n├─user.slice\n│ ├─user-1000.slice\n│ │ ├─user@1000.service\n│ │ │ ├─pulseaudio.service\n│ │ │ │ └─2386 /usr/bin/pulseaudio --daemonize=no\n│ │ │ └─gnome-terminal-server.service\n│ │ │   └─init.scope\n│ │ │     ├─ 4127 /libexec/gnome-terminal-server\n│ │ │     └─ 4198 zsh\n│ │ ...\n│ │ └─session-4.scope\n│ │   ├─ 1264 gdm-session-worker [pam/gdm-password]\n│ │   ├─ 2339 /usr/bin/gnome-shell\n│ │   ...\n│ │ ├─session-19.scope\n│ │   ├─6497 sshd: zbyszek [priv]\n│ │   ├─6502 sshd: zbyszek@pts/6\n│ │   ├─6509 -zsh\n│ │   └─6602 systemd-cgls --no-pager\n│ ...\n│ └─user-1001.slice\n│   ├─session-20.scope\n│   │ ├─6675 sshd: guest [priv]\n│   │ ├─6708 sshd: guest@pts/6\n│   │ └─6717 -bash\n│   └─user@1001.service\n│     ├─init.scope\n│     │ ├─6680 /lib/systemd/systemd --user\n│     │ └─6688 (sd-pam)\n│     └─sleep.service\n│       └─6706 /usr/bin/sleep 30\n...\n\nUser with UID 1000 is logged in using gdm (session-4.scope) and ssh(1) (session-19.scope),\nand also has a user manager instance running (user@1000.service). User with UID 1001 is\nlogged in using ssh (session-20.scope) and also has a user manager instance running\n(user@1001.service). Those are all (leaf) system units, and form part of the slice hierarchy,\nwith user-1000.slice and user-1001.slice below user.slice. User units are visible below the\nuser@.service instances (pulseaudio.service, gnome-terminal-server.service, init.scope,\nsleep.service).\n"
                },
                {
                    "name": "Example 2. Default user resource limits",
                    "content": "$ systemctl cat user-1000.slice\n# /lib/systemd/system/user-.slice.d/10-defaults.conf\n# ...\n[Unit]\nDescription=User Slice of UID %j\nAfter=systemd-user-sessions.service\n\n[Slice]\nTasksMax=33%\n\nThe user-UID.slice units by default don't have a unit file. The resource limits are set\nthrough a drop-in, which can be easily replaced or extended following standard drop-in\nmechanisms discussed in the first section.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "systemd(1), systemd.service(5), systemd.slice(5), systemd.resource-control(5),\nsystemd.exec(5), systemd.special(7), pam(8)\n\n\n\nsystemd 249                                                                         USER@.SERVICE(5)",
            "subsections": []
        }
    },
    "summary": "user@.service, user-runtime-dir@.service, systemd-user-runtime-dir - System units to start the user manager",
    "flags": [],
    "examples": [
        "$ systemd-cgls",
        "Control group /:",
        "-.slice",
        "├─user.slice",
        "│ ├─user-1000.slice",
        "│ │ ├─user@1000.service",
        "│ │ │ ├─pulseaudio.service",
        "│ │ │ │ └─2386 /usr/bin/pulseaudio --daemonize=no",
        "│ │ │ └─gnome-terminal-server.service",
        "│ │ │   └─init.scope",
        "│ │ │     ├─ 4127 /libexec/gnome-terminal-server",
        "│ │ │     └─ 4198 zsh",
        "│ │ ...",
        "│ │ └─session-4.scope",
        "│ │   ├─ 1264 gdm-session-worker [pam/gdm-password]",
        "│ │   ├─ 2339 /usr/bin/gnome-shell",
        "│ │   ...",
        "│ │ ├─session-19.scope",
        "│ │   ├─6497 sshd: zbyszek [priv]",
        "│ │   ├─6502 sshd: zbyszek@pts/6",
        "│ │   ├─6509 -zsh",
        "│ │   └─6602 systemd-cgls --no-pager",
        "│ ...",
        "│ └─user-1001.slice",
        "│   ├─session-20.scope",
        "│   │ ├─6675 sshd: guest [priv]",
        "│   │ ├─6708 sshd: guest@pts/6",
        "│   │ └─6717 -bash",
        "│   └─user@1001.service",
        "│     ├─init.scope",
        "│     │ ├─6680 /lib/systemd/systemd --user",
        "│     │ └─6688 (sd-pam)",
        "│     └─sleep.service",
        "│       └─6706 /usr/bin/sleep 30",
        "...",
        "User with UID 1000 is logged in using gdm (session-4.scope) and ssh(1) (session-19.scope),",
        "and also has a user manager instance running (user@1000.service). User with UID 1001 is",
        "logged in using ssh (session-20.scope) and also has a user manager instance running",
        "(user@1001.service). Those are all (leaf) system units, and form part of the slice hierarchy,",
        "with user-1000.slice and user-1001.slice below user.slice. User units are visible below the",
        "user@.service instances (pulseaudio.service, gnome-terminal-server.service, init.scope,",
        "sleep.service).",
        "$ systemctl cat user-1000.slice",
        "# /lib/systemd/system/user-.slice.d/10-defaults.conf",
        "# ...",
        "[Unit]",
        "Description=User Slice of UID %j",
        "After=systemd-user-sessions.service",
        "[Slice]",
        "TasksMax=33%",
        "The user-UID.slice units by default don't have a unit file. The resource limits are set",
        "through a drop-in, which can be easily replaced or extended following standard drop-in",
        "mechanisms discussed in the first section."
    ],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemd.service",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
        },
        {
            "name": "systemd.slice",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.slice/5/json"
        },
        {
            "name": "systemd.resource-control",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.resource-control/5/json"
        },
        {
            "name": "systemd.exec",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json"
        },
        {
            "name": "systemd.special",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.special/7/json"
        },
        {
            "name": "pam",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/pam/8/json"
        },
        {
            "name": ".SERVICE",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/.SERVICE/5/json"
        }
    ]
}