关机 shutdown -h now #<==立刻关机 shutdown -h +1 #<==一分钟以后关机 shutdown -h 10 #<==10分钟后关机 shutdown -h 23:20 #<==23:20分关机 shutdown -c #<==取消shutdown关机命令 init 0 #<==立马关机(切换运行级别为0,推荐使用) halt #<==立马关机,需要人工关闭电源 poweroff #<==立即停止系统,并且关闭电源 重启 shutdown -r now #<==现在重启 shutdown -r +1 #<==1分钟后重启 shutdown -r 23:20 & #<==23:20分重启,加&符号代表把该命令转到后台处理 reboot #<==立马重启(推荐使用) init 6 #<==立马重启(切换运行级别为6,推荐使用) CentOS7系统systemctl有关关机、重启命令功能小结 systemctl reboot 重启系统 systemctl poweroff 关闭系统并切断电源 systemctl halt 关闭系统CPU停止工作 systemctl suspend 暂停系统 systemctl hibernate 让系统进入冬眠状态 systemctl hygrid-sleep 让系统进入交互式休眠状态 systemctl rescue 启动进入救援状态(单用户状态) halt、poweroff、shutdown、reboot命令都是systemctl命令的链接文件 [root@localhost ~]# ls -l `which reboot` `which poweroff` `which halt` `which shutdown` lrwxrwxrwx. 1 root root 16 Nov 27 19:19 /usr/sbin/halt -> ../bin/systemctl lrwxrwxrwx. 1 root root 16 Nov 27 19:19 /usr/sbin/poweroff -> ../bin/systemctl lrwxrwxrwx. 1 root root 16 Nov 27 19:19 /usr/sbin/reboot -> ../bin/systemctl lrwxrwxrwx. 1 root root 16 Nov 27 19:19 /usr/sbin/shutdown -> ../bin/systemctl