[Linux] 查看系统启动时间

查找系统最后启动时间

1. 使用 who 命令

who -b

输出:code

system boot  2015-10-14 00:51

2. 使用 last 命令

last reboot | head -1

输出:ast

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

输出:grep

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

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

相关文章
相关标签/搜索