50
How can I see how long my server has been running and when it was last rebooted?
Loading...
Q&A · Answered
How can I see how long my server has been running and when it was last rebooted?
Accepted answer
# Check uptime
uptime
# Output: 12:45:01 up 45 days, 3:21, 2 users
# Detailed uptime
uptime -p
# Output: up 45 days, 3 hours, 21 minutes
# Last reboot times
last reboot
# System boot time
who -b
# Using systemd
systemd-analyze timeSay what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.