$linuxjunkies
>

uptime(1)

Display how long the system has been running, along with current load average and number of logged-in users.

UbuntuDebianFedoraArch

Synopsis

uptime [OPTION]

Description

The uptime command shows the current time, how long the system has been running since the last reboot, the number of users currently logged in, and the system load average over the last 1, 5, and 15 minutes.

The load average represents the average number of processes in the system run queue. A load of 1.0 on a single-core system means the CPU is fully utilized; on a 4-core system, a load of 4.0 indicates full utilization.

Common options

FlagWhat it does
-p, --prettyShow uptime in a pretty format with more readable output
-h, --helpDisplay help information and exit
-V, --versionDisplay version information and exit
-s, --sinceDisplay the time and date when the system was last booted

Examples

Show current time, uptime, user count, and load averages in default format

uptime

Display uptime in a human-readable format (e.g., 'up 2 weeks, 3 days')

uptime -p

Show the exact date and time when the system was last rebooted

uptime -s

Monitor uptime and load average in real-time, updating every 2 seconds

watch uptime

Extract just the 1-minute load average from the output

uptime | awk '{print $(NF-2)}'

Related commands