Linux系统如何查看系统系统开机时间?本篇教程和大家 分享一下Linux系统查看系统开机时间的具体方法,本文实操记录、绝无水文,如有遗漏或错误欢迎指正。
1.查看/proc/uptime
root@master1565:~# cat /proc/uptime
673.83 1327.68
root@master1565:~# date -d "`cut -f1 -d. /proc/uptime` seconds ago"
Mon Apr 9 09:36:31 CST 2018
root@master1565:~# date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
2018-04-09 09:36:31
推荐简单明了
date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"
2. who 命令查看
who -b 查看最后一次系统启动的时间。
who -r 查看当前系统运行时间
root@master1565:~# who -b system boot 2018-03-30 23:20 root@master1565:~# who -r run-level 5 2018-03-30 23:20
3. last reboot 可以看到Linux系统历史启动的时间
root@master1565:~# last reboot reboot system boot 4.4.0-116-generi Mon Apr 9 09:36 still running reboot system boot 4.4.0-116-generi Mon Apr 9 09:32 - 09:36 (00:03) wtmp begins Sun Apr 1 21:24:06 2018
查看最后一次Linux系统启动的时间
root@master1565:~# last reboot | head -1 reboot system boot 4.4.0-116-generi Mon Apr 9 09:36 still running
4.TOP命令查看
root@master1565:~# top
root@master1565:~# w
6.uptime 命令查看
root@master1565:~# uptime
以上就是Linux系统查看开机时间的详细教程,欢迎大家在评论区留言。
以上就是良许教程网为各位朋友分享的Linux系统相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多干货等着你!
本文来源:www.lxlinux.net/1208.html,若引用不当,请联系修改。







