查看系统的target
因为我是图形切换的字符,所以是5 3 使用init 3切换即可
[root@centos ~]#init 0 //关闭当前系统
[root@centos ~]#init 6 //重启当前系统
或者
[root@centos ~]#systemctl poweroff //关闭当前系统
[root@centos ~]#systemctl reboot //重启当前系统
原文:https://blog.51cto.com/14156658/2401270