Steps:
1who See who online, netstat-a look at the network connection status, PS aux see background execution program
2sync data synchronously written to disk
3shutdown command shutdown or restart
Note: Shutdown can be switched off or restarted, common parameters-h,-r
Example
Shutdown-h now shut down the machine.
Shutdown-h 20:8-point shutdown
Shutdown-h +10 10 minutes after shutdown
Shutdown-r now restart
Shutdown-r +30 30 minutes after restart
In addition to shutdown can shutdown, there are halt,poweroff can be shut down, in fact, there is also the Init 0 can be shut down.
We all know that there are seven operating levels, to know now at which operating level, you can use RunLevel generally will appear 5 or 3 of the number, on behalf of us in the run Level 5 or 3 mode, to switch the operating level can be used with the Init 0 (1,2,3,4,5,6), The meanings of each operating level are as follows:
Init 0 means shutdown
Init 1 Single-User maintenance mode
Init 2 No network command-line mode
Init 3 has network command-line mode
Init 4 Standby
Init 5 command-line mode with graphical interface
Init 6 Restart
Linux shutdown correct method