您的位置:首页 > 运维架构 > Linux

[Linux] 查看系统启动时间

2015-11-16 09:32 645 查看

查找系统最后启动时间

1. 使用 who 命令

who -b

输出:

system boot  2015-10-14 00:51

2. 使用 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
表示显示系统关闭记录以及运行级别的改变。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: