linux - reisub和正常关机的区别
PHPz
PHPz 2017-04-17 12:06:34
0
1
963

所以说两者到底有什么区别。。

正常关机指shutdown

PHPz
PHPz

学习是最好的投资!

reply all(1)
Ty80

Reprinted without responsibility.

shutdown

The shutdown command safely shuts down the system.
Some users will shut down Linux by directly cutting off the power supply, which is very dangerous. Because Linux is different from Windows, there are many processes running in the background, so forced shutdown may cause the data of the process to be lost, put the system in an unstable state, and even damage the hardware equipment in some systems.

When using the shutdown command before shutting down the system, the system administrator will notify all logged in users that the system will be shut down. And the login command will be frozen, that is, new users can no longer log in. It is possible to shut down directly or delay the shutdown for a certain period of time, and it is also possible to restart. This is determined by the fact that all processes will receive signals sent by the system. This makes things like vi
Programs of this class have time to store the document currently being edited, while programs that process mail (mail) and news (news) can exit normally, etc.

Shutdown performs its job by sending a signal [signal] to the init program, asking it to change the runlevel. Runlevel 0 is used to shut down (halt), runlevel 6 is used to reactivate (reboot) the system, and runlevel 1 is used to put the system into a state where management work can be performed; this is the default, assuming there is no -h There is no -r parameter to shutdown. To understand what actions were taken during the shutdown (halt) or restart (reboot) process, you can see the runlevels-related information in this file /etc/inittab.

reisub

After a system shutdown, if SysRq is turned on and the system can still respond to keyboard keys, you can use the SysRq key to restart. Press

R: Switch the keyboard from raw mode to XLATE mode. Take keyboard control back from X Server (unRaw) E: Send the SIGTERM signal to all processes except init. Send the SIGTERM signal to all processes and let them solve it themselves Aftermath (tErminate)
I: Send the SIGKILL signal to all processes except init. Send the SIGKILL signal to all processes, forcing them to shut down immediately (kIll)
S: Sync all mounted file systems (IMPORTANT). Synchronize all data to disk (Sync)
U: Remount all mounted file systems in read-only mode. Mount all partitions in read-only mode (Unmount)
B: Immediately reboot the system, without un-mounting partitions or syncing. ReBoot

It should be noted that there is a sequence between these keys, and there is a time interval between the keys (because you have to wait for the completion of the previous operation). The recommended time interval is R – 1 second – E – 30 seconds
– I – 10 seconds – S – 5 seconds – U – 5 seconds – B.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template