注意:Linux常用作主机,很少关机。
如果要关机,必须要保证当前系统中没有其他用户在线。
可以下达who指令:查看在线用户
使用netstat -a :查看网络联机状态
使用ps -aux:背景执行的程序
1)正确的关机顺序
sysnc -> shutdown -> reboot -> halt
2)关机指令
A)sysnc 将数据由内存同步到硬盘中
B)shutdown -关机
C)shutdown -h 10 -10分钟之后关机(h:halt[关机])
D)shutdown -h now -立马关机
E)shutdown -h 15:00 -在15:00关机
F)shutdown -h +10 -在10分钟之后关机
3)重启指令 (-r :reboot【重启】)
A)shutdown -r now -立马重启
B)shutdown -r +10 -10分钟之后重启
C)shutdown -重启 = shutdown -r now
4)关闭系统
A)halt
B)poweroff
C)shutdown -h now