restart
Restart system services
SYNOPSIS
sudo systemctl reboot
sudo reboot
sudo shutdown -r now
PARAMETERS
systemctl reboot
Uses Systemd to initiate a reboot. May require sudo
privileges.reboot
Attempts to reboot the system. Usually requires sudo
privileges.shutdown -r now
Shuts down the system and immediately reboots. Requires sudo
privileges. -r
specifies reboot; now
specifies immediate action.shutdown -r +m
Shuts down the system and reboots after m
minutes. Requires sudo
privileges.
DESCRIPTION
The restart
command is not a standard Linux command. It's a generic term often used to describe the process of rebooting or restarting a system. There is no universally defined restart
executable or shell builtin that is part of core Linux distributions. The actual command or method used to reboot the system depends on the init system in use (e.g., Systemd, SysVinit) and the user's privileges.
If using Systemd, the command is typically sudo systemctl reboot
. With SysVinit, sudo reboot
or sudo shutdown -r now
are common options.
Because restart
is not a standard command, its functionality, syntax, and availability are entirely dependent on the specific system configuration. The following information describes a generic use case. Before attempting to restart a system, be sure to save any unsaved data.
CAVEATS
The availability and behavior of the reboot
command, especially when used without Systemd, may vary across different Linux distributions and init systems. Always consult your system's documentation. Incorrect usage can lead to data loss or system instability. Always save unsaved work before rebooting.
INIT SYSTEMS
Older systems used SysVinit, while modern distributions primarily use Systemd. The commands to manage the system (reboot, shutdown, start/stop services) differ depending on which init system is active. Use `ps -p 1` to see if /sbin/init or /lib/systemd/systemd is the first process. That shows the init system in use.
USER PERMISSIONS
Rebooting a system typically requires root privileges. Therefore, you'll usually need to use sudo
before the command. Attempting to reboot without sufficient permissions will result in an error.
GRACEFUL VS. FORCEFUL REBOOT
The commands listed above attempt a graceful reboot, signaling processes to terminate cleanly before the system shuts down. There are ways to force a reboot by using system request keys or hardware resets, but these should only be used as a last resort as they can lead to data corruption.