poweroff
replaces halt
for how I was using it.
I finally took some time to look into why halt
wasn't powering off my computer. This was a very long-standing bug, and it was odd that something so obvious would go unfixed.
-
Provided by the package "pm-utils"
- 2016-03-27 - 1.4.1, on Slackware 14.1
-
2016-03-25 - 1.4.1, on Lubuntu 14.04.4 LTS
2016-03-27 - 1.4.1 ∞
pm-utils-1.4.1-i486-5
This came with Slackware.
(no notes were taken)
2016-03-25 - 1.4.1 ∞
1.4.1-13ubuntu0.2
This came with Lubuntu.
Nuisance ∞
I don't know how this change snuck in, or why it remained unfixed for so long.
Bug 880240 (wontfix) seems to be the most relevant one.
(source)
Steve Langasek (vorlon) wrote on 2012-06-08:Ok, I've worked my way all the way through this bug now, and I have to conclude this is behavior we can't/shouldn't change.
- The
shutdown
command has three options:-h
(halt or power off),-H
(halt), and-P
(power off).- The
halt
command maps to-H
, by design.- The
poweroff
command maps to-P
, by design.- The
/etc/default/halt
configuration *only* affects the behavior when neither-H
nor-P
has been specified.- There is no way to make
halt
by itself map topoweroff
, without making it impossible to do a real 'halt'.These are all standard options that shouldn't be changed.
So I'm closing this bug report as 'wontfix'. The current behavior is inconsistent with previous upstart behavior, but that behavior was buggy. The current behavior is correct, and I'm afraid people will just have to learn that
halt
doesn't mean what you were led to believe it means.If you want the system to poweroff, you need to run either
shutdown -h now
,halt -p
, orpoweroff
. All three commands work.halt -p
is the shortest and probably the most compatible with existing muscle memory.
From what I can tell, halt
used to map to halt -h
and would power off.
It seems that halt
was silently changed to halt -H
which does not power off. Why someone would ever want to halt without powering off is beyond me, and I'm not the only one to point that out. Why it would be made the default is fucking stupid.
So halt
now becomes poweroff
.
Everyone change your habits and edit your scripts, because fuck you.
Last updated 2020-02-11 at 23:01:51