Linux reboot Command: Restart the System Safely

reboot requests a restart of a Linux system. On a server, it affects running tasks and connected users, so it should be executed only after checking the target host and maintenance time.

The usual reboot in a systemd environment requests a restart after cleaning up services and finishing filesystem procedures. The current SSH session will be disconnected immediately after the restart. The forced option -f can skip the normal shutdown process, so avoid it unless it is for responding to special issues.

Basic syntax

sudo reboot [option]

Installed implementations and options may vary depending on the distribution. Check the current system’s description with man reboot.

Examples

Confirm the target server

First, confirm that the host you are connected to is the intended target for reboot.

hostnamectl status

Check logged-in users

Check if there are tasks being done by other users.

who

System Restart

This is a change command executed after completing preliminary checks and notifications.

sudo reboot

What should be checked after a reboot?

sudo reboot immediately starts the system shutdown procedure, so you should not expect a single line of normal output as a result. In a remote SSH session, the connection will be lost, and services and running tasks will be interrupted.

sudo reboot

Examples of phenomena that may be seen in a remote connection:

Connection to host closed by remote host.

After reconnection is possible, check the new boot time with uptime or who -b, and check necessary services with systemctl --failed. You cannot conclude that the reboot was successful based solely on the disconnection message. Make sure to check any unsaved work and remote recovery paths first, then execute at the planned time.

Main Options and Format

Options/Format Description
No arguments Requests a normal system restart.
-f This is a forced restart. The filesystem may not be properly cleaned up.
--no-wall Skips the guidance message sent to other users.
shutdown -r +minutes An alternative to schedule a restart with some delay.

Precautions when using

When executing commands on a remote server, the connection may be disconnected immediately. Check if updates are in progress or if database write operations are ongoing, and prepare recovery access methods. Forced restarts increase the risk of data loss. If scheduling or cancellation is necessary, use shutdown -r +10 and shutdown -c.

Frequently Asked Questions

Can I immediately undo a reboot once executed?

You should not assume that an immediate restart can be reliably canceled. If cancellation may be necessary, schedule it with shutdown to allow some time.

Official Documentation

You can check the exact behavior of the options and implementation differences in the official documentation related to reboot.