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.
reboot
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.
sudo systemctl reboot
3. init 6 command:
The init 6 command puts the system into run level 6, which will cause the system to restart.
sudo init 6
4. shutdown -r command:
shutdown -r command will shut down the system and automatically restart it.
sudo shutdown -r now
5. poweroff -r command:
The poweroff -r command will shut down the system and automatically restart it, similar to shutdown -r.
sudo poweroff -r
Note:
sudo shutdown -r now -f
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!