Linux system restart commands include: reboot (restart immediately), shutdown (restart at a specified time), init 6 (restart through the system initialization controller) and systemctl reboot (use the systemd service to control the restart).
Linux Restart Command
The Linux operating system provides a variety of commands that can be used to restart the system. The following are commonly used ones:
reboot
<code>reboot</code> command is the most commonly used command to restart a Linux system. It will immediately shut down the system and restart it. The
shutdown
shutdown
command allows you to specify the time for the reboot. It accepts the following parameters:
-r
: Restart the system -t
followed by time (in seconds): Specify Restart the system after the specified timeinit
##init command is the controller of the system initialization process. The system can be restarted by running
init 6. The
systemctl
systemctl command can be used to control system services. It accepts the following parameters:
: Reboot the system
Example
To restart the system immediately , please run the following command:<code>reboot</code>
<code>shutdown -r +5</code>
systemctl to restart the system, run the following command :
<code>systemctl reboot</code>
The above is the detailed content of What are the restart commands for linux?. For more information, please follow other related articles on the PHP Chinese website!