{
    "mode": "man",
    "parameter": "systemd.device",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.device/5/json",
    "generated": "2026-06-12T14:34:35Z",
    "synopsis": "device.device",
    "sections": {
        "NAME": {
            "content": "systemd.device - Device unit configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "device.device\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A unit configuration file whose name ends in \".device\" encodes information about a device\nunit as exposed in the sysfs/udev(7) device tree. This may be used to define dependencies\nbetween devices and other units.\n\nThis unit type has no specific options. See systemd.unit(5) for the common options of all\nunit configuration files. The common configuration items are configured in the generic [Unit]\nand [Install] sections. A separate [Device] section does not exist, since no device-specific\noptions may be configured.\n\nsystemd will dynamically create device units for all kernel devices that are marked with the\n\"systemd\" udev tag (by default all block and network devices, and a few others). Note that if\nsystemd-udev.service is not running, no device units will be available (for example in a\ntypical container).\n\nDevice units are named after the /sys/ and /dev/ paths they control. Example: the device\n/dev/sda5 is exposed in systemd as dev-sda5.device. For details about the escaping logic used\nto convert a file system path to a unit name see systemd.unit(5).\n\nTo tag a udev device, use \"TAG+=\"systemd\"\" in the udev rules file, see udev(7) for details.\n\nDevice units will be reloaded by systemd whenever the corresponding device generates a\n\"changed\" event. Other units can use ReloadPropagatedFrom= to react to that event.\n",
            "subsections": []
        },
        "AUTOMATIC DEPENDENCIES": {
            "content": "",
            "subsections": [
                {
                    "name": "Implicit Dependencies",
                    "content": "Many unit types automatically acquire dependencies on device units of devices they require.\nFor example, .socket unit acquire dependencies on the device units of the network interface\nspecified in BindToDevice=. Similar, swap and mount units acquire dependencies on the units\nencapsulating their backing block devices.\n"
                },
                {
                    "name": "Default Dependencies",
                    "content": "There are no default dependencies for device units.\n"
                }
            ]
        },
        "THE UDEV DATABASE": {
            "content": "Unit settings of device units may either be configured via unit files, or directly from the\nudev database. The following udev device properties are understood by the service manager:\n\nSYSTEMDWANTS=, SYSTEMDUSERWANTS=\nAdds dependencies of type Wants= from the device unit to the specified units.\nSYSTEMDWANTS= is read by the system service manager, SYSTEMDUSERWANTS= by user service\nmanager instances. These properties may be used to activate arbitrary units when a\nspecific device becomes available.\n\nNote that this and the other udev device properties are not taken into account unless the\ndevice is tagged with the \"systemd\" tag in the udev database, because otherwise the\ndevice is not exposed as a systemd unit (see above).\n\nNote that systemd will only act on Wants= dependencies when a device first becomes\nactive. It will not act on them if they are added to devices that are already active. Use\nSYSTEMDREADY= (see below) to configure when a udev device shall be considered active,\nand thus when to trigger the dependencies.\n\nThe specified property value should be a space-separated list of valid unit names. If a\nunit template name is specified (that is, a unit name containing an \"@\" character\nindicating a unit name to use for multiple instantiation, but with an empty instance name\nfollowing the \"@\"), it will be automatically instantiated by the device's \"sysfs\" path\n(that is: the path is escaped and inserted as instance name into the template unit name).\nThis is useful in order to instantiate a specific template unit once for each device that\nappears and matches specific properties.\n\nSYSTEMDALIAS=\nAdds an additional alias name to the device unit. This must be an absolute path that is\nautomatically transformed into a unit name. (See above.)\n\nSYSTEMDREADY=\nIf set to 0, systemd will consider this device unplugged even if it shows up in the udev\ntree. If this property is unset or set to 1, the device will be considered plugged if it\nis visible in the udev tree.\n\nThis option is useful for devices that initially show up in an uninitialized state in the\ntree, and for which a \"changed\" event is generated the moment they are fully set up. Note\nthat SYSTEMDWANTS= (see above) is not acted on as long as SYSTEMDREADY=0 is set for a\ndevice.\n\nIDMODELFROMDATABASE=, IDMODEL=\nIf set, this property is used as description string for the device unit.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemctl(1), systemd.unit(5), udev(7), systemd.directives(7)\n\n\n\nsystemd 249                                                                        SYSTEMD.DEVICE(5)",
            "subsections": []
        }
    },
    "summary": "systemd.device - Device unit configuration",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemctl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
        },
        {
            "name": "systemd.unit",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
        },
        {
            "name": "udev",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/udev/7/json"
        },
        {
            "name": "systemd.directives",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
        },
        {
            "name": "SYSTEMD.DEVICE",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/SYSTEMD.DEVICE/5/json"
        }
    ]
}