Halt Poweroff Shutdown Linux

Embed Size (px)

Citation preview

  • 8/16/2019 Halt Poweroff Shutdown Linux

    1/1

    New: The systemd toolsethalt, reboot, poweroff, telinit, and shutdown are all one program. It's actually systemd's own systemctl program. It has several command line parsers for the various command line syntaxes of those commands, as well as its own, but after that largely funnels into one code path internally. There's no difference between using halt and its command options to trigger an action and using shutdown and its command options to trigger the same action.

    systemd does not consider rescue mode (which is what the systemd people have renamed single user mode) to be a shut down system state, and it is not reachablewith any of these commands. Option-less shutdown now is the same as poweroff.-----------

    Old1.If the machine in question does not have power management capabilities, there isn't a difference. If it does, the difference is power off will send the signal to power the machine off, Halt will shut everything down and it will wait at a "Power Off" prompt, meaning it is safe to hit the power switch.

    2.In the very old days, "shutdown" was a request to run through the init scripts and try to gracefully stop everything running by notifying it that the system was

     about to stop and it should clean up or exit nicely.

    "Halt" was the brick wall. The system just stopped immediately without doing any orderly shutdown. It was nicer to the system than just pulling the input power... but not much.

    3.Well, technically speaking, you can halt the system without powering it off. Soyou issue a halt, wait for it to say "You can turn the computer off now" and then you can hit the power button without worrying that something is going to unmount weirdly.

    But in most modern unix's halt, shutdown, init 0, poweroff, etc, etc all do about the same thing. Halt, for example, is mapped to "shutdown -h" when the systemisn't in runlevel 0 or 6.

    The redundant commands are all nods to backward compatibility with older, proprietary *nix's.