Linux:开关机命令

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

注意:

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

猜你喜欢

转载自blog.csdn.net/drl_blogs/article/details/89684815