0

About man shutdown at:

it indicates:

   ...
   -H, --halt
       Halt the machine.

-P, --poweroff Power-off the machine (the default).

-r, --reboot Reboot the machine.

-h Equivalent to --poweroff, unless --halt is specified. ...

Therefore the two following commands are the same (taking in consideration the default time about from now that is +1)

shutdown
shutdown -P

But what about shutdown -h?

Question

  • When is useful the -h option? or How does -h work?
Manuel Jordan
  • 1,728
  • 2
  • 16
  • 40
  • Practical answer varies greatly between init systems and distributions. Somewhere shutdown now will turn the power off, somewhere only "halt" the system, meaning all the processes will be terminated, but power won't be turned off and one can only do that by pressing the power button, or reboot. Same goes for shutdown -h now. – Vilinkameni Apr 17 '22 at 09:35

1 Answers1

0

halt - If you are logged in as root, issuing the halt command will cease all CPU function on the system. On most systems, this will drop you into single-user mode and then power off the machine. If you're not logged in as root, prefix the halt command with sudo to run the command as the superuser.

poweroff - If you are logged in as root, issuing the poweroff command sends an ACPI hardware signal which will instruct the system to commence with a complete and immediate shutdown. This is roughly equivalent to pressing the power button on a typical desktop computer.

Ron
  • 111