Home > Common Problem > Linux shutdown command

Linux shutdown command

百草
Release: 2024-05-06 13:23:05
Original
7743 people have browsed it

Linux shutdown commands include shutdown command, halt command, poweroff command and reboot command. Detailed introduction: 1. The shutdown command is used to shut down the system. When using this command, you can choose to shut down immediately or shut down after a specified time; 2. The halt command is used to shut down the system and stop all processes. Compared with the shutdown command, the halt command does not Cleaning work during the shutdown process will be performed, so it may take longer to complete the shutdown; 3. Poweroff command, etc.

Linux shutdown command

In Linux systems, the commonly used shutdown commands include the following:

1. Shutdown command: The shutdown command is used to shut down the system. When using this command, you can choose to shut down immediately or shut down after a specified time. For example, use the following command to shut down immediately:

sudo shutdown -h now
Copy after login

Or, use the following command to shut down after 5 minutes:

sudo shutdown -h +5
Copy after login

2. Halt command: The halt command is used to shut down the system and stop all processes. Compared with the shutdown command, the halt command does not perform cleanup during the shutdown process, so it may take longer to complete the shutdown. Use the following command to shut down immediately:

sudo halt
Copy after login

3. Poweroff command: The poweroff command is used to shut down the system and disconnect the power supply. Similar to the halt command, the poweroff command does not perform cleanup during the shutdown process, so it may take longer to complete the shutdown. Use the following command to shut down immediately:

sudo poweroff
Copy after login

Recommended related reading:

[shoudongurl]What is the Linux shutdown command[/shoudongurl]

[shoudongurl]What are the shutdown and restart commands for Linux[/shoudongurl]

[shoudongurl]What are the shutdown commands for Linux[/shoudongurl]

[shoudongurl]How to implement linux shutdown and restart function in php[/shoudongurl]

4. Reboot command: The reboot command is used to restart the system. Use the following command to restart the system:

sudo reboot
Copy after login

The above are common shutdown commands in Linux systems. It should be noted that using these commands requires sufficient permissions, so you may need to use sudo or execute these commands as the root user. In addition, when executing shutdown commands such as shutdown, halt, and poweroff, the system will send notifications to all users so that users can save their work and prepare for shutdown.

The above is the detailed content of Linux shutdown command. 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