The reboot
command is used to restart the system immediately or after a specified delay.
The reboot
command is a straightforward way to reboot your Linux system. It can be used by system administrators to restart the machine, either immediately or with a delay, ensuring that all processes are terminated and the system is rebooted cleanly.
The basic syntax of the reboot
command is as follows:
reboot [options] [arguments]
-f
: Force the reboot without flushing the file systems.-i
: Send an interrupt signal to all processes before rebooting.-p
: Power off the machine after rebooting.--help
: Display help information about the command.Here are some practical examples of using the reboot
command:
reboot
reboot -f
reboot -p
shutdown -r +5
(This command schedules a reboot in 5 minutes. Note that shutdown
is often used for delayed reboots.)
shutdown -r now "System is rebooting for maintenance."
(This sends a message to all users before rebooting.)
reboot
command to avoid data loss.-f
option with caution, as it can lead to data corruption if processes are not terminated properly.shutdown
for scheduled reboots, as it provides more control over the timing and messaging to users.