Home Explore Blog CI



man-pages

19th chunk of `systemctl.man`
4214f04995ab5b3edfe33ec0fd69c208f8bd8a946f89942f0000000100000fa3
 If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the system halt. If --force
           is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss. Note that when --force is specified twice the halt
           operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.

       poweroff
           Shut down and power-off the system. This is mostly equivalent to systemctl start poweroff.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This command is
           asynchronous; it will return after the power-off operation is enqueued, without waiting for it to complete.

           If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the powering off. If --force
           is specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss. Note that when --force is specified twice the power-off
           operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.

       reboot
           Shut down and reboot the system.

           This command mostly equivalent to systemctl start reboot.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This command is asynchronous; it will return after the
           reboot operation is enqueued, without waiting for it to complete.

           If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the reboot. If --force is
           specified twice, the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss. Note that when --force is specified twice the reboot operation
           is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.

           If the switch --reboot-argument= is given, it will be passed as the optional argument to the reboot(2) system call.

           Options --boot-loader-entry=, --boot-loader-menu=, and --firmware-setup can be used to select what to do after the reboot. See the descriptions of those options for details.

       kexec
           Shut down and reboot the system via kexec. This is equivalent to systemctl start kexec.target --job-mode=replace-irreversibly --no-block. This command is asynchronous; it will return after the reboot operation is
           enqueued, without waiting for it to complete.

           If combined with --force, shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the reboot.

       exit [EXIT_CODE]
           Ask the service manager to quit. This is only supported for user service managers (i.e. in conjunction with the --user option) or in containers and is equivalent to poweroff otherwise. This command is
           asynchronous; it will return after the exit operation is enqueued, without waiting for it to complete.

           The service manager will exit with the specified exit code, if EXIT_CODE is passed.

       switch-root ROOT [INIT]
           Switches to a different root directory and executes a new system manager process below it. This is intended for use in the initrd, and will transition

Title: systemctl: Poweroff, Reboot, Kexec, Exit and Switch-Root Commands
Summary
This section details the `poweroff`, `reboot`, `kexec`, `exit`, and `switch-root` commands in `systemctl`. It explains how to use these commands to shut down, power off, reboot (including options for force reboot and specifying boot loader entries), reboot via kexec, exit a user service manager or container, and switch to a different root directory. The `force` option allows skipping service shutdown but can lead to data loss if used twice.