Home > Article > Operation and Maintenance > What are the linux shutdown commands?
Linux shutdown commands include: shutdown command, halt command, poweroff command and reboot command. shutdown will schedule a time for the system to shut down. It can be used to stop, shut down, and restart the machine.
The operating environment of this article: red hat enterprise linux 6.1 system, thinkpad t480 computer.
Detailed introduction:
(Learning video sharing: linux video tutorial)
shutdown command
shutdown will plan a system Time to shut down. It can be used to stop, shut down, and restart the machine.
You can specify a time string (usually now or hh:mm to specify hours/minutes) as the first parameter. Additionally, you can set up a broadcast message to be sent to all logged in users before the system is shut down.
Important: If the time parameter is used, the /run/nologin file will be created 5 minutes before the system is shut down. to ensure that no one can log in anymore.
shutdown command example:
# shutdown # shutdown now # shutdown 13:20 # shutdown -p now ### 关闭机器 # shutdown -H now ### 停止机器 # shutdown -r09:35 ### 在 09:35am 重启机器
To cancel an upcoming shutdown, just enter the following command:
# shutdown -c
halt command
halt tells the hardware to stop All CPU functions, but still remains powered. You can use it to keep your system in a low-maintenance state.
Note that in some cases it will shut down the system completely. The following is an example of the halt command:
# halt ### 停止机器 # halt -p ### 关闭机器 # halt --reboot ### 重启机器
poweroff The command
poweroff will send an ACPI signal to notify the system to shut down.
The following is an example of the poweroff command:
# poweroff ### 关闭机器 # poweroff --halt ### 停止机器 # poweroff --reboot ### 重启机器
reboot command
reboot notifies the system to restart.
# reboot ### 重启机器 # reboot --halt ### 停止机器 # reboot -p ### 关闭机器
Related recommendations: linux tutorial
The above is the detailed content of What are the linux shutdown commands?. For more information, please follow other related articles on the PHP Chinese website!