🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

uptime Command

Beginner System Information man(1)

Show how long the system has been running

👁 9 views 📅 Updated: Mar 15, 2026
SYNTAX
uptime [OPTION]...

What Does uptime Do?

uptime shows how long the system has been running, the current time, number of logged-in users, and system load averages for the last 1, 5, and 15 minutes.

uptime provides a quick health check of any system. High load averages relative to CPU count indicate the system is overloaded. Load average represents the average number of processes waiting for CPU.

uptime is commonly used for quick system checks, monitoring scripts, and verifying that a system has not unexpectedly rebooted.

Options & Flags

OptionDescriptionExample
-p Show uptime in human-readable format uptime -p
-s Show system boot time uptime -s

Practical Examples

#1 Standard uptime

Shows time, uptime, users, and load averages.
$ uptime
Output: 14:30:00 up 45 days, 3:22, 2 users, load average: 0.15, 0.10, 0.05

#2 Pretty format

Shows uptime in human-readable format.
$ uptime -p
Output: up 45 days, 3 hours, 22 minutes

#3 Boot time

Shows when the system was started.
$ uptime -s
Output: 2024-11-15 11:08:00

#4 Check load averages

Extracts just the load averages.
$ uptime | awk -F"load average:" '{print $2}'
Output: 0.15, 0.10, 0.05

#5 Script monitoring

Creates a monitoring summary line.
$ echo "$(hostname): $(uptime -p), Load: $(cut -d" " -f1 /proc/loadavg)"

#6 Check for recent reboot

Shows boot time — useful for verifying unexpected reboots.
$ uptime -s

Tips & Best Practices

Load average interpretation: Load average should be compared to CPU count. On a 4-core system: <4 is healthy, 4 is fully loaded, >4 is overloaded. Check cores: nproc.
Three averages: 1-minute average shows current activity. 5-minute shows recent trend. 15-minute shows longer trend. Rising 1-min with low 15-min means a new spike.
Load includes I/O wait: Load average includes processes waiting for I/O (disk), not just CPU. High load with low CPU usage means I/O bottleneck.

Frequently Asked Questions

How do I check system uptime?
Run uptime. It shows how long the system has been running, users, and load averages.
What is a good load average?
Below your CPU core count. Check cores with nproc. On 4 cores: load 1.0 = 25% utilized, 4.0 = 100%, >4.0 = overloaded.
How do I check when the system last rebooted?
uptime -s shows the boot time. Or use who -b or last reboot.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →