shutdown & reboot & last

shutdown

sudo shutdown [-h/-r/ ] [now/+10/22:00]

  • -h:系统停止运作(halt)
  • -r:重启(reboot)
  • 放空:类同于 -h
  • now:立即执行
  • +10:10分钟后执行
  • 22:00:指定时间点22:00执行

reboot

sudo reboot

last

查询本机过去处于 关机状态 的时段

last -x shutdown
shutdown system down  4.4.0-87-generic Sat Sep 23 22:00 - 08:15 (2+10:14)   
shutdown system down  4.4.0-87-generic Sat Sep 23 08:15 - 08:15  (00:00)    
shutdown system down  4.4.0-87-generic Sat Sep 23 08:08 - 08:09  (00:00)    
shutdown system down  4.4.0-87-generic Sat Sep 23 08:02 - 08:02  (00:00)    
shutdown system down  4.4.0-87-generic Fri Sep  8 11:33 - 07:59 (14+20:26)  
shutdown system down  4.4.0-87-generic Thu Sep  7 17:34 - 08:15  (14:41)    
shutdown system down  4.4.0-87-generic Wed Sep  6 21:46 - 08:13  (10:27)    
shutdown system down  4.4.0-87-generic Wed Sep  6 14:09 - 14:11  (00:02)    
shutdown system down  4.4.0-87-generic Tue Sep  5 21:00 - 07:50  (10:49)    
shutdown system down  4.4.0-87-generic Mon Sep  4 17:31 - 08:01  (14:30)    
shutdown system down  4.4.0-87-generic Sat Sep  2 11:32 - 08:26 (1+20:53)   
shutdown system down  4.4.0-87-generic Fri Sep  1 20:17 - 08:28  (12:11)

wtmp begins Fri Sep  1 20:17:36 2017

查询本机过去处于 开机状态 的时段

last -x reboot
reboot   system boot  4.4.0-87-generic Tue Sep 26 08:15 - 08:30  (00:15)    
reboot   system boot  4.4.0-87-generic Sat Sep 23 08:15 - 22:00  (13:45)    
reboot   system boot  4.4.0-87-generic Sat Sep 23 08:09 - 08:15  (00:05)    
reboot   system boot  4.4.0-87-generic Sat Sep 23 08:02 - 08:08  (00:06)    
reboot   system boot  4.4.0-87-generic Sat Sep 23 07:59 - 08:02  (00:02)    
reboot   system boot  4.4.0-87-generic Fri Sep  8 08:15 - 11:33  (03:17)    
reboot   system boot  4.4.0-87-generic Thu Sep  7 08:13 - 17:34  (09:20)    
reboot   system boot  4.4.0-87-generic Wed Sep  6 14:11 - 21:46  (07:34)    
reboot   system boot  4.4.0-87-generic Wed Sep  6 07:50 - 14:09  (06:19)    
reboot   system boot  4.4.0-87-generic Tue Sep  5 08:01 - 21:00  (12:58)    
reboot   system boot  4.4.0-87-generic Mon Sep  4 08:26 - 17:31  (09:04)    
reboot   system boot  4.4.0-87-generic Sat Sep  2 08:28 - 11:32  (03:03)    

wtmp begins Fri Sep  1 20:17:36 2017


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值