{
    "mode": "man",
    "parameter": "systemd-shutdown",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/systemd-shutdown/8/json",
    "generated": "2026-09-01T06:22:29Z",
    "synopsis": "systemd-poweroff.service\nsystemd-halt.service\nsystemd-reboot.service\nsystemd-kexec.service\n/usr/lib/systemd/systemd-shutdown\n/usr/lib/systemd/system-shutdown/",
    "sections": {
        "NAME": {
            "content": "systemd-poweroff.service, systemd-halt.service, systemd-reboot.service, systemd-\nkexec.service, systemd-shutdown - System shutdown logic\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "systemd-poweroff.service\n\nsystemd-halt.service\n\nsystemd-reboot.service\n\nsystemd-kexec.service\n\n/usr/lib/systemd/systemd-shutdown\n\n/usr/lib/systemd/system-shutdown/\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "systemd-poweroff.service is a system service that is pulled in by poweroff.target and is\nresponsible for the actual system power-off operation. Similarly, systemd-halt.service is\npulled in by halt.target, systemd-reboot.service by reboot.target and systemd-kexec.service\nby kexec.target to execute the respective actions.\n\nWhen these services are run, they ensure that PID 1 is replaced by the\n/usr/lib/systemd/systemd-shutdown tool which is then responsible for the actual shutdown.\nBefore shutting down, this binary will try to unmount all remaining file systems (or at least\nremount them read-only), disable all remaining swap devices, detach all remaining storage\ndevices and kill all remaining processes.\n\nIt is necessary to have this code in a separate binary because otherwise rebooting after an\nupgrade might be broken — the running PID 1 could still depend on libraries which are not\navailable any more, thus keeping the file system busy, which then cannot be re-mounted\nread-only.\n\nShortly before executing the actual system power-off/halt/reboot/kexec systemd-shutdown will\nrun all executables in /usr/lib/systemd/system-shutdown/ and pass one arguments to them:\neither \"poweroff\", \"halt\", \"reboot\", or \"kexec\", depending on the chosen action. All\nexecutables in this directory are executed in parallel, and execution of the action is not\ncontinued before all executables finished. Note that these executables are run after all\nservices have been shut down, and after most mounts have been detached (the root file system\nas well as /run/ and various API file systems are still around though). This means any\nprograms dropped into this directory must be prepared to run in such a limited execution\nenvironment and not rely on external services or hierarchies such as /var/ to be around (or\nwritable).\n\nNote that systemd-poweroff.service (and the related units) should never be executed directly.\nInstead, trigger system shutdown with a command such as \"systemctl poweroff\".\n\nAnother form of shutdown is provided by the systemd-soft-reboot.service(8) functionality. It\nreboots only the OS userspace, leaving the kernel, firmware, and hardware as it is.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemctl(1), systemd.special(7), reboot(2), systemd-suspend.service(8), systemd-\nsoft-reboot.service(8), bootup(7)\n\nsystemd 255                                                              SYSTEMD-POWEROFF.SERVICE(8)",
            "subsections": []
        }
    },
    "summary": "systemd-poweroff.service, systemd-halt.service, systemd-reboot.service, systemd- kexec.service, systemd-shutdown - System shutdown logic",
    "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.special",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.special/7/json"
        },
        {
            "name": "reboot",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/reboot/2/json"
        },
        {
            "name": "systemd-suspend.service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-suspend.service/8/json"
        },
        {
            "name": "soft-reboot.service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/soft-reboot.service/8/json"
        },
        {
            "name": "bootup",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/bootup/7/json"
        },
        {
            "name": "SYSTEMD-POWEROFF.SERVICE",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/SYSTEMD-POWEROFF.SERVICE/8/json"
        }
    ]
}