halt and poweroff

11,439

Halt does just what it says: it stops the machine, leaving it in a powered-on state (which usually implies that someone has to reboot or shut it down manually afterwards). Like halt, poweroff also stops the machine, but also shut it down afterwards.

The fact that on your physical machine the halt command also shuts the machine down, might just be a tweak of your linux distribution (the proper halt behavior probably doesn't make much sense for everyday use).

Check

man halt

for details.

As for the CPU usage of your virtual machine after a halt, my half-educated guess is that since the operating system is not running on it anymore, no HLT instruction can be issued and therefore your console meter shows a 100% CPU usage (maybe your virtual machine control panel computes the CPU occupancy by checking how many HLT instructions are executed per second):

http://en.wikipedia.org/wiki/Idle_(CPU)

Share:
11,439
Shehbaz Jaffer
Author by

Shehbaz Jaffer

Updated on July 25, 2022

Comments

  • Shehbaz Jaffer
    Shehbaz Jaffer almost 2 years

    What is the difference between Halt and Poweroff commands? I understand that both of them lead to shutdown of the machine, then why 2 commands?

    I want to know this because in my Virtual Machine. Poweroff leads to complete closure of VM. Whrereas halt leads to killing of all processes, and then a stall with 100% CPU Utilization. After giving the msg "System is going to be Shut down". This does not happen when, say I use halt to shutdown my computer. Basically both halt and poweroff lead to proper shutdown in a stand alone computer (no VM).