The 1,shutdown command will safely shut down the system.
Common parameters:
Shutdown now:-H is the system shuts down immediately. Instance
[Email protected] tianhao]# shutdown-h now
[Email protected] tianhao]# shutdown now
Specify time to shut down: The time parameter can specify when to shut down, or how long to shut down the computer. Instance
[[email protected] tianhao]# shutdown +5//5 min after shutdown
[[email protected] tianhao]# shutdown 10:30//10:30 shutdown
Restart after shutdown:-R to set shutdown and restart. Instance
[[email protected] tianhao]# Shutdown-r now//close system immediately
[[email protected] tianhao]# shutdown-r 23:50//restart system at 23 Point 50
2,halt the simplest shutdown command
Halt is actually called the Shutdown-h
Common parameters:
-F Force shutdown without calling shutdown
3,reboot
Similar to halt, but the difference is that reboot triggers a host reboot, and Halt is shutdown
4,init
Very powerful command, is the ancestor of all processes below only a few common
Init 0 shutdown
Init 1 Single user, mode (typically used when changing power-on passwords and system outages)
Init 6 Restart
5,logout logoff
For this command logout, it is not available in CentOS,
Tip: Bash:logout:not login shell:use ' exit '
This article is from the "Good Day" blog, please make sure to keep this source http://tianhaoblog.blog.51cto.com/6467511/1679342
CentOS shutdown, restart, logout command detailed