Article Title: Tips for shutting down a Linux operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In Linux, there are up to six shutdown commands. There are shutdown, reboot, halt, poweroff, telinit, init and other commands respectively. Although some commands have a parent-child relationship with each other, it can at least be explained that the Linux system has some knowledge about shutdown. These commands can be used to shut down or restart the system, but the workflow of each of them is different and can be used for different purposes. Next, I will introduce the features of these shutdown commands and what commands should be used under what circumstances.
1. Relationship between the six shutdown commands.
In these six commands, some commands have a parent-child relationship. For example, there is a parent-child relationship between halt and poweroff. In the halt command, if the-p parameter is added, it plays the same role as poweroff. If the system administrator needs to know whether a shutdown command is connected to other key commands (that is, whether it has a parent-child relationship with other shutdown commands), the system administrator can use the command shown for query.
Insert:
The first record above indicates that the poweroff command is the connection of the halt command. That is, the poweroff command is a subroutine of the halt command. The second record indicates that the halt command is not connected to other commands. That is, the halt command is the top command. Therefore, if the system administrator does not understand the relationship between these shutdown commands, the system administrator can use the preceding command to query them. These six shutdown commands are all generated by the software package sysvinit. the system administrator can download its source code from the Internet to analyze the process of each command. As a system administrator, it is necessary to understand the similarities and differences between these commands and select appropriate shutdown commands as needed. Instead of simply using the poweroff command for shutdown.
[1] [2] [3] Next page