Commands for the Linux Shimonoseki and reboots are shutdown, reboot, Halt, Poweroff, init. Let's take a look at how these commands are used.
1, Shutdown: In fact, shutdown execution shutdown is by calling Init to perform shutdown or restart, requires Inti change the RunLevel: Init 0 is shutdown, init 1 restarts. Note that the shutdown command requires root to execute.
Use format:
shutdown [OPTION] ... Time [MESSAGE]
Parameters:
- c//When the "shutdown-h 11:50" command is executed, the shutdown instruction can be interrupted by pressing the + key.
-f//reboot does not execute fsck.
-f//Restart when fsck is executed.
-H//Turn the system off.
-k//simply sends out information to all users, but does not actually shut down.
-N//Do not call the INIT program to shut down, but by shutdown itself.
-R//shutdown after reboot.
Number of seconds to delay between-t < seconds >//Send warning message and delete information.
[TIME]//set how long after the execution of the shutdown instruction.
[WARNING message]//information to be transmitted to all logged-in users.
2, Reboot:halt and Poweroff command is actually reboot soft connection
Use format:
Reboot [OPTION] ...
Halt [OPTION] ...
Poweroff [OPTION] ...
Parameters:
-d// reboot does not write data to the record file /var/tmp/wtmp
-F// Force reboot, do not invoke the function of shutdown instruction.
-H// before the system shuts down or Poweroff , put all the hard drives in standby mode
- I.// shut down network settings and restart the system
-N// save data and restart the system
This article is from the "Summer Month" blog, please make sure to keep this source http://lkc0110.blog.51cto.com/3410558/1687787
Linux Shutdown and restart commands