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?

laktak
  • 5,616
  • 20
  • 38
  • Since `reboot` in Arch Linux is [actually `systemctl`](https://unix.stackexchange.com/q/209766/70524), I strongly doubt it doesn't stop services. – muru Aug 23 '17 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 '17 at 11:36
  • 1
    If in doubt, just use `init 6`. – M_dk Aug 23 '17 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 '17 at 11:43
  • As far as I understand, the safest command should be `shutdown -r`. Could someone confirm that? – a.j. tawleed Sep 17 '17 at 11:09

1 Answers1

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.

laktak
  • 5,616
  • 20
  • 38