Function rustix::system::reboot

source ·
pub fn reboot(cmd: RebootCommand) -> Result<()>
Expand description

reboot—Reboot the system or enable/disable Ctrl-Alt-Del.

The reboot syscall, despite the name, can actually do much more than reboot.

Among other things, it can:

  • Restart, Halt, Power Off, and Suspend the system
  • Enable and disable the Ctrl-Alt-Del keystroke
  • Execute other kernels
  • Terminate init inside PID namespaces

It is highly recommended to carefully read the kernel documentation before calling this function.

§References