In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How many shutdown commands does linux have? Many novices are not very clear about this. In order to help you solve this problem, the following small series will explain it in detail for everyone. Those who have this need can come to learn. I hope you can gain something.
1、shutdown
The shutdown command is used to safely shut down a Linux system.
Because Linux, unlike Windows, has many processes running in the background, forcing a shutdown can cause data loss for processes, leave the system in an unstable state, and even damage hardware devices.
When the shutdown command is executed, all logged in users are notified that the system is going to shut down, and the login command is frozen, that is, new users can no longer log in to the system.
The shutdown command essentially sends a signal to the init program asking it to switch system runlevels.
The operating levels of the system include:
0: Shut down the system
1: Single-user mode, which switches to this runlevel by default if executed directly without specifying the-h or-r parameter for shutdown
2: Multi-user mode (NFS not supported)
3: Multi-user mode (NFS support), generally used this level of operation
5: Multi-user mode (GUI mode)
6: Restart the system
2、halt
halt is the simplest shutdown command, which is actually a call to shutdown -h. Halt kills the application process when executed, and stops the kernel when the file system write operation is complete.
Some of the parameters of the halt command are as follows:
[-f]Forced shutdown or restart without calling shutdown
[-i]Turn off all network interfaces before shutting down or restarting
[-p]poweroff is invoked when shutdown, this option is the default
3、init
Init is the ancestor of all processes, and its process number is always 1.
Init is used to switch the operating level of the system, and the switching is done immediately.
The init 0 command is used to immediately switch the system runlevel to 0, i.e. shutdown; the init 6 command is used to switch the system runlevel to 6, i.e. restart.
Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.