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

What is the shutdown command of the Linux system

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

Share

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

This article is to share with you what the shutdown command of the Linux system is, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

The shutdown commands in Linux systems are shutdown, reboot, poweroff, and halt, but what's the difference between them?

The command shutdown recommended by shutdown is the most common and secure shutdown and restart command, which calls fsck to check the disk before shutting down, where-h and-r are the most commonly used parameters:

-h: stop the system service and shut down the machine-r: restart the system service after stopping the system service [plain] view plain copy-h: stop the system service and shut down the machine-r: restart after stopping the system service: see the following examples:

Shutdown-h now-- shut down immediately shutdown-h 10:53-- shut down at 10:53, if the time is less than the current time Then automatically shut down shutdown-r now after shutdown-h + 10-10 minutes-immediately restart shutdown-r + 30 'The System Will Reboot in 30 Mins'-30 minutes later restart and send a notification to other online users [plain] view plain copy shutdown-h now-shut down immediately shutdown-h 10:53-shut down at 10:53 if the time is less than the current time Then automatically shut down shutdown-r now after shutdown-h + 10-10 minutes-immediately restart shutdown-r + 30 'The System Will Reboot in 30 Mins'-- restart 30 minutes later and send a notification to other online users 1234567891011rebootreboot to indicate immediate restart. The effect is the same as shutdown-r now.

Poweroffpoweroff means shutdown immediately, which is equivalent to shutdown-h now and is not recommended in multi-user mode (Run Level 3).

Halt ignores the current system condition and performs hardware shutdown. Generally, it is not recommended to use the

The above is what the shutdown command of the Linux system is. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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: 233

*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