根据分发,reboot命令似乎有不同的工作方式.
例如,在Ubuntu / Debian和CentOS上,它首先关闭服务,而在Arch Linux上它会立即重新启动(至少在我的设置中).
使用重启是否总是安全的?
解决方法:
我找到了很好的解释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.
它还解释了在systemd工具集上它总是首先关闭服务,就像@muru提到的那样.