天天看点

CentOS7学习-关机

关机的指令

  • 数据同步写入磁盘sync
  • 常用的关机指令shutdown
  • 重启,关机:reboot,halt,poweroff

shutdown

-t 添加秒数,几秒后关机

-k 不是真关机,而是发出告警信息

-r 在系统服务都停止后,重启

-h 在系统服务都停止后,关机

-f 关闭并且开机以后,强行略过磁盘检查

-F 重启后,强制进行磁盘检查

-c 取消已经在进行的shutdown指令内容

例子:

shutdown -h now

shutdown -h 12:00

shutdown -h +10

shutdown -r now

shutdown -r +30 ‘the system will reboot’

shutdown -k now ‘the system will reboot’

服务等级

init 0 关机

init6 重启

init3 纯文本模式

init5 含有图形接口

继续阅读