halt
作用:关闭系统
例如:
[[email protected] ~]# halt
poweroff
作用:关闭系统
例如:
[[email protected] ~]# poweroff
reboot
作用:重新启动系统
例如:
[[email protected] ~]# reboot
shutdown
作用:关闭或重启系统系统
常用参数
-h 关闭系统
[[email protected] ~]# shutdown -h now ##关闭系统
[[email protected] ~]# shutdown -h +20 ##系统在20分钟之后关闭
Broadcast message from [email protected]
(/dev/pts/0) at 17:29 ...
The system is going down for halt in 20 minutes!
-r 重新启动系统,相当于Windows下的restart
[[email protected] ~]# shutdown -r now ##关闭系统后重新启动
[[email protected] ~]# shutdown -r 22:00 ##系统在22:00后重新启动
Broadcast message from [email protected]
(/dev/pts/0) at 17:31 ...
The system is going down for reboot in 269 minutes!
init
作用:切换运行级别,后面跟对应的运行级别
例如:
[[email protected] ~]# init 0 ##关闭系统
[[email protected] ~]# init 6 ##重新启动系统