Skip to main content

reboot Cheatsheet

By Dejan Panovski Updated on Download PDF

Quick reference for rebooting and scheduling restarts on Linux

A quick reference for rebooting Linux from the command line. Covers immediate reboots, force levels, scheduled restarts with shutdown and systemctl, boot loader options, and how to cancel a pending restart.

Immediate Reboot

CommandDescription
sudo rebootReboot immediately
sudo systemctl rebootReboot via systemd
sudo shutdown -r nowReboot immediately via shutdown

systemctl Options

CommandDescription
sudo systemctl --no-wall rebootReboot without broadcasting a wall message
sudo systemctl --message="reason" rebootLog a reason in the system journal
sudo systemctl reboot --when=+10minReboot in 10 minutes (systemd 254+)
sudo systemctl reboot --when=cancelCancel a pending reboot (systemd 254+)

Force Levels

CommandDescription
sudo systemctl reboot --forceSkip service shutdown, still unmount file systems
sudo systemctl reboot -ffReboot at once, no unmount (risk of data loss)
sudo reboot -fMostly equivalent to systemctl reboot -ff
sudo reboot -nDo not sync storage media first

reboot Command Flags

FlagDescription
-f, --forceReboot without contacting the system manager
--haltHalt the machine instead of rebooting
-w, --wtmp-onlyWrite the wtmp entry only, do not reboot
-d, --no-wtmpDo not write a wtmp shutdown entry
--no-wallDo not send a wall message

Boot Loader and Firmware

CommandDescription
sudo systemctl reboot --firmware-setupReboot into the UEFI or BIOS setup
sudo systemctl reboot --boot-loader-menu=10Show the boot loader menu for 10 seconds
sudo systemctl reboot --boot-loader-entry=IDBoot a specific entry once
sudo systemctl reboot --boot-loader-entry=helpList available entry identifiers

Schedule with shutdown -r

CommandDescription
sudo shutdown -r +5Reboot in 5 minutes
sudo shutdown -r 10:00Reboot at 10:00
sudo shutdown -r +10 "message"Reboot in 10 minutes with a wall message
sudo shutdown -rReboot after 1 minute (default)

Cancel and Status

CommandDescription
sudo shutdown -cCancel a scheduled reboot
sudo systemctl reboot --when=showShow the scheduled action (systemd 254+)
last rebootShow reboot history
uptime -sShow current boot time
journalctl --list-bootsList all boot sessions