Linux shutdown and restart commands

Linux has the following shutdown and reboot commands: shutdown, reboot, halt, poweroff, then they have what difference does it make?

shutdown - command Recommended

shutdown is the most common and most safe shutdown and restart commands, it will call fsck check the disk before the shutdown, which -h -r and is the most commonly used parameters:
-h: stop system services and shut down
-r: After stopping system services restart
For example:
the shutdown -h now - immediately shutdown
shutdown -h 10:53 - 10:53 to shut down, if the time is less than current time, the next day the
shutdown -h +10 --10 minutes after shut down automatically
shutdown -r now - immediately restart
shutdown -r +30 'The System Will Reboot in 30 Mins' --30 minutes after the restart, and other online and send notifications to the user
 
reboot
reboot restart immediately expressed, the effect is equivalent to the shutdown -r now
 
poweroff
poweroff represents immediate shutdown, the effect is equivalent to the shutdown -h now, in multi-user mode (Run Level 3) is not recommended.
 
halt
Ignored under the current system status, hardware shutdown, is not recommended

Guess you like

Origin www.cnblogs.com/superming/p/11315733.html