halt

作用:关闭系统

例如:

[root@lb ~]# halt


poweroff

作用:关闭系统

例如:

[root@lb ~]# poweroff


reboot

作用:重新启动系统

例如:

[root@lb ~]# reboot


shutdown

作用:关闭或重启系统系统

常用参数

-h    关闭系统

[root@lb ~]# shutdown -h now    ##关闭系统

[root@lb ~]# shutdown -h +20    ##系统在20分钟之后关闭

Broadcast message from linbin@lb.anjubao.com
        (/dev/pts/0) at 17:29 ...

The system is going down for halt in 20 minutes!


-r    重新启动系统,相当于Windows下的restart

[root@lb ~]# shutdown -r now    ##关闭系统后重新启动
[root@lb ~]# shutdown -r 22:00    ##系统在22:00后重新启动

Broadcast message from linbin@lb.anjubao.com
        (/dev/pts/0) at 17:31 ...

The system is going down for reboot in 269 minutes!


init

作用:切换运行级别,后面跟对应的运行级别

例如:

[root@lb ~]# init 0    ##关闭系统

[root@lb ~]# init 6    ##重新启动系统