Linux:开关机命令

  • shutdown:
    • shutdown -h now:立即关机
    • shutdown -h 1:表示1分钟后关机
    • shutdown -r now: 表示立即重启
  • halt
    • 效果等价与关机
  • reboot
    • 重启系统
  • sync: 把内容数据同步到磁盘

注意:

当关机和重启时,都应该先执行sync命令,把内存的数据写入磁盘,防止数据丢失

posted @ 2019-04-29 23:21  drl_blogs  阅读(182)  评论(0编辑  收藏  举报