{
    "mode": "man",
    "parameter": "systemd.target",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.target/5/json",
    "generated": "2026-05-30T06:05:47Z",
    "synopsis": "target.target",
    "sections": {
        "NAME": {
            "content": "systemd.target - Target unit configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "target.target\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A unit configuration file whose name ends in \".target\" encodes information about a target\nunit of systemd, which is used for grouping units and as well-known synchronization points\nduring start-up.\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 [Target] section does not exist, since no target-specific\noptions may be configured.\n\nTarget units do not offer any additional functionality on top of the generic functionality\nprovided by units. They exist merely to group units via dependencies (useful as boot\ntargets), and to establish standardized names for synchronization points used in dependencies\nbetween units. Among other things, target units are a more flexible replacement for SysV\nrunlevels in the classic SysV init system. (And for compatibility reasons special target\nunits such as runlevel3.target exist which are used by the SysV runlevel compatibility code\nin systemd. See systemd.special(7) for details).\n",
            "subsections": []
        },
        "AUTOMATIC DEPENDENCIES": {
            "content": "",
            "subsections": [
                {
                    "name": "Implicit Dependencies",
                    "content": "There are no implicit dependencies for target units.\n"
                },
                {
                    "name": "Default Dependencies",
                    "content": "The following dependencies are added unless DefaultDependencies=no is set:\n\n•   Target units will automatically complement all configured dependencies of type Wants= or\nRequires= with dependencies of type After= unless DefaultDependencies=no is set in the\nspecified units. Note that Wants= or Requires= must be defined in the target unit itself\n— if you for example define Wants=some.target in some.service, the automatic ordering\nwill not be added.\n\n•   Target units automatically gain Conflicts= and Before= dependencies against\nshutdown.target.\n"
                }
            ]
        },
        "EXAMPLE": {
            "content": "",
            "subsections": [
                {
                    "name": "Example 1. Simple standalone target",
                    "content": "# emergency-net.target\n\n[Unit]\nDescription=Emergency Mode with Networking\nRequires=emergency.target systemd-networkd.service\nAfter=emergency.target systemd-networkd.service\nAllowIsolate=yes\n\nWhen adding dependencies to other units, it's important to check if they set\nDefaultDependencies=. Service units, unless they set DefaultDependencies=no, automatically\nget a dependency on sysinit.target. In this case, both emergency.target and\nsystemd-networkd.service have DefaultDependencies=no, so they are suitable for use in this\ntarget, and do not pull in sysinit.target.\n\nYou can now switch into this emergency mode by running systemctl isolate emergency-net.target\nor by passing the option systemd.unit=emergency-net.target on the kernel command line.\n\nOther units can have WantedBy=emergency-net.target in the [Install] section. After they are\nenabled using systemctl enable, they will be started before emergency-net.target is started.\nIt is also possible to add arbitrary units as dependencies of emergency.target without\nmodifying them by using systemctl add-wants.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "systemd(1), systemctl(1), systemd.unit(5), systemd.special(7), systemd.directives(7)\n\n\n\nsystemd 249                                                                        SYSTEMD.TARGET(5)",
            "subsections": []
        }
    },
    "summary": "systemd.target - Target unit configuration",
    "flags": [],
    "examples": [
        "# emergency-net.target",
        "[Unit]",
        "Description=Emergency Mode with Networking",
        "Requires=emergency.target systemd-networkd.service",
        "After=emergency.target systemd-networkd.service",
        "AllowIsolate=yes",
        "When adding dependencies to other units, it's important to check if they set",
        "DefaultDependencies=. Service units, unless they set DefaultDependencies=no, automatically",
        "get a dependency on sysinit.target. In this case, both emergency.target and",
        "systemd-networkd.service have DefaultDependencies=no, so they are suitable for use in this",
        "target, and do not pull in sysinit.target.",
        "You can now switch into this emergency mode by running systemctl isolate emergency-net.target",
        "or by passing the option systemd.unit=emergency-net.target on the kernel command line.",
        "Other units can have WantedBy=emergency-net.target in the [Install] section. After they are",
        "enabled using systemctl enable, they will be started before emergency-net.target is started.",
        "It is also possible to add arbitrary units as dependencies of emergency.target without",
        "modifying them by using systemctl add-wants."
    ],
    "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": "systemd.special",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.special/7/json"
        },
        {
            "name": "systemd.directives",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
        },
        {
            "name": "SYSTEMD.TARGET",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/SYSTEMD.TARGET/5/json"
        }
    ]
}