Home  >  Article  >  System Tutorial  >  What are the restart commands for linux?

What are the restart commands for linux?

下次还敢
下次还敢Original
2024-04-12 11:36:13941browse

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).

What are the restart commands for linux?

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 time

init

##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: Reboot the system

Example

To restart the system immediately , please run the following command:

<code>reboot</code>
To specify a system restart after 5 minutes, run the following command:

<code>shutdown -r +5</code>
To use

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn