Are there any good reasons to halt a system without switching off power to the hardware? I mean using the
halt command without using the
I haven’t been able to find an answer on the Internet.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Are there any good reasons to halt a system without switching off power to the hardware?
Yes. I might want to push its reset button and reboot it, instead of pushing its power button to turn off its power.
I mean using the
haltcommand without using the
In 4.2BSD, the
halt command did not have a
-p switch. This points towards the larger answer, here: Not all hardware works like a PC; even PCs haven't always worked the way that they do now.
It has not been (and still sometimes is not) the case that Central Processing Units have control over the power supply, or can fully reset the mainboard and peripherals to the same states as they have at power-on. On some systems, the second part of "shut down and power off" or "shut down and reset" was a physical action, taken by the operator pressing a (proper) power button or a reset button on the machine's front panel. No amount of command-line switches could achieve it. On the software side, the machine simply shut down and then spun in an infinite loop doing nothing. (Some machines would exit to a ROM monitor program.)
Modern BSDs note that their
-p option only turns off power "if it can" (FreeBSD) and will not do so where "the system does not support software powerdown" (NetBSD). The SCO UNIX
haltsys command (the System 5 equivalent for
halt) also didn't have a
-p option, and its manual page explains that it halts the system so that the operator can then, through other means, power it off or reboot it.
Nowadays, there are those who, like the systemd folk, maintain that the
halt command is in fact obsolete. They would maintain that one really does not have to use the
halt command at all and that it exists in systems "for compatibility only" (as the systemd manual pages have it). This rather renders the question of what options to give to it moot (
systemctl halt not having a
It also demonstrates the position that we are now in that this command set has become so festooned with compatibility options that it allows people to give computers self-contradictory instructions like
reboot --halt and
poweroff --reboot. I noted this in the manual page for the nosh
poweroff commands. ☺
halt. 1982-05-11. 4.2BSD manual.
haltsys. 2005-06-03. SCO OpenServer manual.
haltsys. nosh Guide. Softwares.
fastpowercycle. nosh Guide. Softwares.
shutdown. nosh Guide. Softwares.
halt. systemd manual pages. freedesktop.org.