温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2022-01-21 13:58:30 来源:亿速云 阅读:1377 作者:清风 栏目:开发技术

本文将为大家详细介绍“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

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

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

Linux系统如何查看系统开机时间 5.w命令查看

 root@master1565:~# w

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

6.uptime 命令查看

 root@master1565:~# uptime

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

Linux有哪些版本

Linux的版本有:Deepin、UbuntuKylin、Manjaro、LinuxMint、Ubuntu等版本。其中Deepin是国内发展最好的Linux发行版之一;UbuntuKylin是基于Ubuntu的衍生发行版;Manjaro是基于Arch的Linux发行版;LinuxMint默认的Cinnamon桌面类似Windows XP简单易用;Ubuntu则是以桌面应用为主的Linux操作系统。

感谢您能读到这里,小编希望您对“Linux系统如何查看系统开机时间”这一关键问题有了从实践层面最深刻的体会,具体使用情况还需要大家自己动手实践使用过才能领会,如果想阅读更多相关内容的文章,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI