通过下面几种方式查看系统 重启时间/开机时间:
1️⃣ 用 uptime
查看开机时间
uptime -s
- 输出示例:
2025-09-26 00:45:12
表示系统从这个时间开始运行。
2️⃣ 用 who -b
查看最后一次重启时间
who -b
- 输出示例:
system boot 2025-09-26 00:45
3️⃣ 用 last reboot
查看重启记录
last reboot
- 会显示所有重启历史记录,最新的在最上面:
reboot system boot 6.8.0-1035-oracle Fri Sep 26 00:45 still running
reboot system boot 6.8.0-1035-oracle Thu Sep 25 15:10 - 15:20 (00:10)
✅ 建议
- 如果只关心 最近一次开机/重启时间,用:
uptime -s
最简单明了。