will halt the system - meaning the system will shutdown and at the end stop at a screen with the last message beeing something like "System halted".
# shutdown -P now
will power off the system - meaning the system will shutdown and at the end power off (only possible if the system actually supports it but most systems I know have for quite a while now)
# shutdown -h now
will only halt or power off the system depending on what's the default on that system (can sometimes be changed in BIOS)
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.
I'm fairly certain that a halt will just bring the OS down wheras a Power Off will bring the OS down and then send an ACPI power off command to the power supply.
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 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 system isn't in runlevel 0 or 6.
The redundant commands are all nods to backward compatibility with older, proprietary *nix's.
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.
Halting involves stopping all CPUs on the system. Powering off involves sending an ACPI command to signal the PSU to disconnect main power.
IIRC
will halt the system - meaning the system will shutdown and at the end stop at a screen with the last message beeing something like "System halted".
will power off the system - meaning the system will shutdown and at the end power off (only possible if the system actually supports it but most systems I know have for quite a while now)
will only halt or power off the system depending on what's the default on that system (can sometimes be changed in BIOS)
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.
I'm fairly certain that a halt will just bring the OS down wheras a Power Off will bring the OS down and then send an ACPI power off command to the power supply.
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 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 system isn't in runlevel 0 or 6.
The redundant commands are all nods to backward compatibility with older, proprietary *nix's.
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.