reboot Command Cheat Sheet
reboot restarts the system. It is essentially a shortcut for shutdown -r now.
Synopsis
reboot [OPTIONS]
Basic Usage
sudo reboot
Force Reboot (-f)
If the system processes are hanging and preventing a clean shutdown, you can force it. Warning: This does not stop services or unmount disks safely. Data corruption possible.
sudo reboot -f
Logging the Reboot (-w)
Don't actually reboot, just write a reboot record to the /var/log/wtmp file.
sudo reboot -w
View Last Reboots
To see when the system was rebooted in the past.
last reboot
Or check uptime:
uptime -s
Related Commands
shutdown -r now: The "polite" way.init 6: The classic SysVinit way.systemctl reboot: The Systemd way.
Notes
- On most modern systems,
rebootis a symlink tosystemctl. - Magic SysRq: If the kernel is completely frozen (kernel panic) and
rebootdoesn't work, you might need the Magic SysRq key combination (Alt+SysRq+REISUB) to safely reboot.