[Linux] 查看系统启动时间

查找系统最后启动时间

  1. 使用 who 命令

who -b

输出:

system boot  2015-10-14 00:51
  1. 使用 last 命令

last reboot | head -1

输出:

reboot   system boot  3.13.0-32-generi Wed Oct 14 00:51 - 09:30 (5+08:39)

last 命令通过查找 /var/log/wtmp 文件,并显示登录登出用户名单。

查找系统最后关闭时间

last -x | grep shutdown | head -1

输出:

shutdown system down  2.6.15.4         Sun Apr 30 13:31 - 15:08  (01:37)

参数 -x 表示显示系统关闭记录以及运行级别的改变。

posted @ 2015-11-16 09:32  iFantasticMe  阅读(421)  评论(0编辑  收藏  举报