Home > System Tutorial > LINUX > body text

What are the Linux system restart commands?

下次还敢
Release: 2024-04-12 12:45:14
Original
631 people have browsed it

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.

What are the Linux system restart commands?

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>
Copy after login

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>
Copy after login

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>
Copy after login

4. shutdown -r command:

shutdown -r command will shut down the system and automatically restart it.

<code class="bash">sudo shutdown -r now</code>
Copy after login

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>
Copy after login

Note:

  • Be sure to save any unsaved changes before running the restart command.
  • If the system encounters a problem and cannot restart, you can use the "force" option to force a restart. For example:
<code class="bash">sudo shutdown -r now -f</code>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!