Home > Article > System Tutorial > What are the Linux system restart commands?
There are several common commands to restart the Linux system: 1. reboot to restart the system; 2. systemctl reboot to use the systemd service manager to restart; 3. init 6 to restart at run level 6; 4. shutdown -r to shut down and restart the system. Automatically restart; 5. poweroff -r shuts down and automatically restarts.
Linux system restart command
In the Linux system, there are several commonly used commands that can be used to restart the system.
1. reboot command:
The reboot command is the most commonly used reboot command. It will reload the kernel and reboot the system.
<code class="bash">reboot</code>
2. systemctl reboot command:
The systemctl reboot command uses the systemd service manager to restart the system. It provides some additional options, such as specifying the target runlevel or startup mode.
<code class="bash">sudo systemctl reboot</code>
3. init 6 command:
The init 6 command puts the system into run level 6, which will cause the system to restart.
<code class="bash">sudo init 6</code>
4. shutdown -r command:
shutdown -r command will shut down the system and automatically restart it.
<code class="bash">sudo shutdown -r now</code>
5. poweroff -r command:
The poweroff -r command will shut down the system and automatically restart it, similar to shutdown -r.
<code class="bash">sudo poweroff -r</code>
Note:
<code class="bash">sudo shutdown -r now -f</code>
The above is the detailed content of What are the Linux system restart commands?. For more information, please follow other related articles on the PHP Chinese website!