加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Linux中如何查看系统开机时间 - Linux系统

发布时间:2014-12-04 23:36:29 所属栏目:Linux 来源:站长网
导读:有时候需要查看Linux系统运行了多久时间,此时需要知道上次开机启动时间; 有时候由于断电或供电故障突然停机,需要查看Linux开机时间/重启时间; 下面总结一些
有时候需要查看Linux系统运行了多久时间,此时需要知道上次开机启动时间; 有时候由于断电或供电故障突然停机,需要查看Linux开机时间/重启时间;  下面总结一些查看Linux开机关机时间的方法(非常全面)

1: who 命令查看

who -b 查看最后一次系统启动的时间。

who -r 查看当前系统运行时间

[root@DB-Server ~]# who -b

system boot May 11 09:27

2: last  reboot

如下所示last reboot可以看到Linux系统历史启动的时间。 重启一下操作系统后,然后

[root@DB-Server ~]# last reboot

reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:07)

reboot system boot 2.6.9-42.ELsmp Sun May 11 09:27 (18+05:55)

wtmp begins Mon May 5 16:18:57 2014

如果只需要查看最后一次Linux系统启动的时间

[root@DB-Server ~]# last reboot | head -1

reboot system boot 2.6.9-42.ELsmp Thu May 29 15:25 (00:08)

3:TOP命令查看

如下截图所示,up后表示系统到目前运行了多久时间。反过来推算系统重启时间

返回栏目页:http://www.bianceng.cn/OS/Linux/

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读