Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the shutdown command of Linux

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report