Skip to content

Q&A · Answered

How to check system uptime and reboot history

asked 9 months, 1 week ago 582 views 1 answer
50

How can I see how long my server has been running and when it was last rebooted?

1 Answer

One accepted
17

Accepted answer

Not confirmed since it was written, 9 months, 1 week ago
# 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 time

Your answer

Say what you tried, not only what worked — the next person needs the reasoning. Code goes in a fenced block.

Shown beside your answer and never checked, so it cannot be a name someone already has here.

No account needed to answer. Sign in instead and it carries your name and earns reputation.