Vous êtes sur la page 1sur 1

New: The systemd toolset

halt, 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 va
rious command line syntaxes of those commands, as well as its own, but after tha
t largely funnels into one code path internally. There's no difference between u
sing halt and its command options to trigger an action and using shutdown and it
s command options to trigger the same action.
systemd does not consider rescue mode (which is what the systemd people have ren
amed single user mode) to be a shut down system state, and it is not reachable
with any of these commands. Option-less shutdown now is the same as poweroff.
----------Old
1.
If the machine in question does not have power management capabilities, there is
n't a difference. If it does, the difference is power off will send the signal t
o power the machine off, Halt will shut everything down and it will wait at a "P
ower 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 a
nd 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. So
you issue a halt, wait for it to say "You can turn the computer off now" and the
n you can hit the power button without worrying that something is going to unmou
nt weirdly.
But in most modern unix's halt, shutdown, init 0, poweroff, etc, etc all do abou
t the same thing. Halt, for example, is mapped to "shutdown -h" when the system
isn't in runlevel 0 or 6.
The redundant commands are all nods to backward compatibility with older, propri
etary *nix's.

Vous aimerez peut-être aussi