Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the shutdown command of Linux

Shulou Source: shulou.com Published: 2022-06-01 18:09:48 10月05日 Update

This article mainly explains "how to use the shutdown command of Linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use the shutdown command of Linux.

Shutdown is the safest shutdown and restart command. It is recommended to use the shutdown command to shut down and restart when you use it.

(1)。 Common option

-c cancel the contents of the shutdown instruction that is already in progress

-h shutdown

-k sends a warning message to all registrants

-r restart

(2) unique parameters for .unbuntu, but no parameters for CentOS

-f Force to skip fsck disk detection after restart

-F Force fsck disk detection after restart

(3)。 Example

Execute the shutdown command at a specific time

Shutdown-h now / / shut down immediately shutdown-h 12:00 / / shut down at 12:00

Specify the shutdown after five minutes and issue a warning message

[root@CentOS6 Desktop] # shutdown + 5 "This System will be shutdown in 5 minutes" Broadcast message from root@CentOS6.8 (/ dev/pts/0) at 13:33 … The system is going down for maintenance in 5 minutes! / / system reminder This System will be shutdown in 5 minutes / / user customized reminder

Specify to restart in 3 minutes and issue a warning message

[root@CentOS6 Desktop] # shutdown-r + 3 "shutdown and restart after 3 minutes" Broadcast message from root@CentOS6.8 (/ dev/pts/0) at 13:53 … The system is going down for reboot in 3 minutes! / / system reminder 3 minutes after shutdown and restart / / user customized reminder

Send reminders to all logged-in users

[root@CentOS6 Desktop] # shutdown-k "Waring:maybe the system will be shutdown" Shutdown:time expectedTry'shutdown-- help' for more information. [root@CentOS6 Desktop] # shutdown-k 5 "Waring:maybe the system will be shutdown" [root@CentOS6 Desktop] # Broadcast message from root@CentOS6.8 (/ dev/pts/0) at 14:26 … The system is going down for maintenance in 5 minutesWaringWaring the system will be shutdown here, I believe you have a better understanding of "how to use the shutdown command of Linux". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Commands desktops content users parameters disks systems warning letters learning enforcement detection login utility deeper security information interest examples practicality reality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno vpn Shulou Information MariaDB Redmi