1、Centos6关机命令
CentOS6立即关机一共有三种形式:
① shutdown命令:
[root@localhost ~]# shutdown -h 0
② init命令:
[root@localhost ~]# init 0
③ halt命令(与Centos7不同
):
[root@localhost ~]# halt
2、Centos7关机命令
CentOS7立即关机有三种形式:
① shutdown命令:
[root@localhost ~]# shutdown -h 0
② init命令:
[root@localhost ~]# init 0
③ halt命令(与Centos6不同,需要加参数-p
):
[root@localhost ~]# halt -p
【注】:在centos7版本中,如果直接使用不带参数的 halt命令
,会出现如下画面:
【解决方法】:关闭客户机,重启即可!!!