9

shutdown now kills everything and then powers down the machine. halt kills everything and then... there is no step 2. It will sit, running but not doing anything, until people stop arguing over whether Emacs or Vim is better.

Why doesn't halt actually power down the machine? Is there a historical reason?

strugee
  • 14,951
  • There's this one too: http://unix.stackexchange.com/questions/42572/halt-and-poweroff-options-for-shutdown-command – slm Nov 16 '13 at 08:11
  • Useful info on these commands too: http://userpages.umbc.edu/~jack/ifsm498d/shutdown.html – slm Nov 16 '13 at 08:12

1 Answers1

6

See @bahamat's answer to this question titled: Halt and poweroff options for shutdown command.

.... halt was used before ACPI (which today will turn off the power for you)*. It would halt the system and then print a message to the effect of "it's ok to power off now". Back then there were physical on/off switches, rather than the combo ACPI controlled power button of modern computers. ...

The halt command would also do other things to put the system into a known good state prior to halting, such as syncing the disks and sending the commands to the CPU so that it knew to HALT.

See the Wikipedia page on HCF - Halt and Catch Fire.

excerpt

Halt and Catch Fire, known by the mnemonic HCF, refers to several computer machine code instructions that cause the CPU to cease meaningful operation. The expression "catch fire" is intended as a joke; the CPU does not catch fire. It is also occasionally referred to as "SDI" for "Self Destruct Immediate".

slm
  • 369,824