I want to have the message system halted after command shutdown -H now, but my new PC after this command power-off the machine.

With my old PC that command worked fine. But my new PC is powered down after the command shutdown -H now instead of halting with message system halted on screen. What happened?

How to return normal behaviour of the shutdown -H now command?

OS version is Debian 8.5. Same version of OS is using on both machines, but reactions on shutdown -H now command are different.

Could it be settings in BIOS? Could it be a hardware problem?

  • That should work. What happened? – ctrl-alt-delor Jul 17 at 14:47
  • 1
    Which operating system version are you using? Since the "poweroff" operation is usually used more often than just "halt", some Linux distributions may default to assuming the user means "poweroff" when "halt" is used, but there is likely a configuration file that can be used to fix it. The details will depend on the used distribution & version. – telcoM Jul 18 at 7:36
  • I moved your comments to your question (you can also edit you question). – ctrl-alt-delor Jul 18 at 8:31
  • Of course, but tomorrow... – Андрей Серегин Jul 18 at 13:42

In Debian 9.x and, if I recall correctly, also in 8.x, the default behavior of shutdown -h now is determined by file /etc/default/halt.

By default, it says:

# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".

Change the second line to HALT=halt, and then you should have your halt without an automatic power-down.

Older versions of the shutdown command did not care about the case of the -H option, for compatibility with other Unix-style systems; Debian 9 seems to have shutdown -H always halt, shutdown -P always power-down, and shutdown -h will do whatever the configuration file says. I don't have a Debian 8 system at hand, but it might be that Debian 8 is old enough to have a version of shutdown that still treats -H as equivalent to -h.

  • Thanks for answer but you don't read my ask properly. "Same version of OS is using on both machines, but reactions on shutdown -H now command are different." On my old PC command works correctly. – Андрей Серегин Jul 18 at 13:32
  • Does your old PC have the /etc/default/halt file configured differently? – telcoM Jul 18 at 13:42
  • No no. Both systems configured absolutely equally straight from box. – Андрей Серегин Jul 18 at 13:45
  • Then the old PC might be incapable of powering down by software control, causing fallback to classic "halt" even with no modifications to /etc/default/halt configuration file. Maybe it has all its power management features disabled in BIOS, which might disable software power control too. On the new PC, you seem to be getting the default halt behavior of old Debian: "power down if possible, unless specifically configured not to." – telcoM Jul 18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.