linux关机重启指令

shutdown
shutdown -h now  # 立即关机
shutdown - h 1   # 一分钟后关机
shutdown -r now  # 立即重启
halt
# 直接使用,效果等价于关机
reboot
# 重启
sync
# 把内存的数据同步到磁盘中
logout
# 注销用户(图形运行级别无效)

注意:

当我们关机或重启时,都应该先执行sync将内存数据同步到磁盘中。

猜你喜欢

转载自www.cnblogs.com/Ghostant/p/12561189.html
今日推荐