Home  >  Article  >  System Tutorial  >  What is the command to restart linux?

What is the command to restart linux?

下次还敢
下次还敢Original
2024-04-11 19:51:21867browse

The Linux reboot command is reboot, which restarts the system by sending a signal to the kernel. Its usage is to enter sudo reboot in the terminal. It supports -f instant restart, -p shutdown restart, -n simulated restart and other parameters. Other related commands include shutdown (safe shutdown), poweroff (immediate shutdown), and halt (halt).

What is the command to restart linux?

Linux restart command

The command to restart the Linux system is reboot. It sends a signal to the kernel instructing it to safely restart the system.

Usage

To restart the Linux system, enter the following command in the terminal:

<code>sudo reboot</code>

Parameters

# The

##reboot command supports the following parameters:

  • -f: Reboot immediately without any confirmation.
  • -p: Shut down and then restart.
  • -n: Do not perform actual restart, only simulate the restart process.

Usage example

  • Restart the system immediately:
<code>sudo reboot -f</code>
  • Restart after shutdown:
<code>sudo reboot -p</code>
  • Simulate the restart process:
<code>sudo reboot -n</code>

Other related commands

In addition to the

reboot command, there are other Linux commands related to rebooting:

  • shutdown: Safely shut down the system and Restart or shut down.
  • poweroff: Shut down immediately.
  • halt: Stop the system from running.

The above is the detailed content of What is the command to restart 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