5

The reboot command appears to work differently depending on the distribution.

For example on Ubuntu/Debian and CentOS it shuts down services first while on Arch Linux it reboots immediately (at least with my setup).

Is it always safe to use reboot?

5
  • Since reboot in Arch Linux is actually systemctl, I strongly doubt it doesn't stop services.
    – muru
    Aug 23, 2017 at 11:34
  • @muru so that means it's always safe to use? If I sudo reboot on Arch I see the boot screen in ~0 secs.
    – laktak
    Aug 23, 2017 at 11:36
  • 1
    If in doubt, just use init 6.
    – M_dk
    Aug 23, 2017 at 11:41
  • 1
    @laktak I see it in a couple of seconds, but usually faster than in, say Ubuntu. It depends on what you run and what you're running it on.
    – muru
    Aug 23, 2017 at 11:43
  • As far as I understand, the safest command should be shutdown -r. Could someone confirm that? Sep 17, 2017 at 11:09

1 Answer 1

10

I found a very good explanation here

The BSD halt and reboot commands were low-level, drastic, and immediate. The considerate way to shut down a BSD system was the shutdown command, which did all of the things that one expects to happen: wall messages to users, services gracefully killed, log entries written, logins disabled, and so forth.

It also explains that on the systemd toolset it always shuts down services first like @muru mentioned.

1
  • 1
    Yeah, I do remember fairly well the first time I issued an halt in a Solaris server... catastrophic. Aug 23, 2017 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .