Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Systemctl reboot vs. reboot

Dude!May 4 2019 — edited May 7 2019

Hi,

The documentation instructs to use systemctl reboot to restart the system.

https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-s3-bootconf.html

The filesystems shows /sbin/reboot is a symbolic link to systemctl:

# ls -l /sbin/reboot

lrwxrwxrwx. 1 root root 16 Apr 27 13:57 /sbin/reboot -> ../bin/systemctl

Apparently, systemctl checks how it's involved and systemctl reboot and reboot are presumably the same. However, the documentation does not explain this. Why do instructions not use reboot and poweroff? Is there any difference?

Also shutdown is a symbolic link to systemctl.

$ ls -l /sbin/shutdown

lrwxrwxrwx. 1 root root 16 Apr 27 13:57 /sbin/shutdown -> ../bin/systemctl

So, we can still use shutdown -r now to restart the system. I find that confusing.

It's important that a reboot goes through the usual shutdown procedures. According to man reboot, I can specify the --force option twice (reboot -f -f) to restart the system without using the shutdown manager. If I remember correctly, on some Unix systems, reboot was only safe to use in single user mode/

Thanks!

Comments
Post Details
Added on May 4 2019
2 comments
8,071 views