Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

uptime

Show how long the system runs, how many users are logged in and the load average.

Level
Everyday Linux
Group
Processes and jobs
Needs root
No
Package
procps-ng

What it does

The load average is the number of processes that run or wait (for CPU or disk), as an average over 1, 5 and 15 minutes. Compare it with the number of CPU cores (nproc): a load of 4 on 2 cores means processes wait.

How to write it

uptime [OPTION]...

Options 4

Most used

-p, --pretty
Only the run time, in words.
-s, --since
The date and time of the boot.
-h, --help
Show help.
-V, --version
Show the version.

Examples 10

$ run as a normal user# run as root (or with sudo)

  1. 1Default output

    uptime
     10:52:01 up  2:54,  2 users,  load average: 0.15, 0.10, 0.09

    Time, run time, users, load 1/5/15 minutes.

  2. 2Run time in words

    uptime -p
    up 2 hours, 54 minutes

    Easy to read.

  3. 3Boot time

    uptime -s
    2026-10-25 07:58:12

    Did the server reboot in the night?

  4. 4Load per core

    echo "$(cut -d' ' -f1 /proc/loadavg) / $(nproc)" | bc -l

    Over 1.0 = more work than cores.

  5. 5Raw load data

    cat /proc/loadavg
    0.15 0.10 0.09 1/182 4410

    Also running/total processes and the last PID.

  6. 6Watch the load

    watch -n 5 uptime

    The 1-minute value reacts first.

  7. 7On many servers

    for h in server1 server2; do echo -n "$h: "; ssh $h uptime; done

    Quick overview.

  8. 8Unexpected reboot? (security)

    uptime -s; last -x reboot | head -3

    Compare with the change calendar.

  9. 9Same line in w and top

    w | head -1

    w and top show the uptime line first.

  10. 10Alert on high load in a script

    awk -v c=$(nproc) '$1 > c {print "high load: " $1}' /proc/loadavg

    Simple check for cron.

Files

/proc/uptime
Seconds since boot.
/proc/loadavg
Load averages.

Exit codes

0 :: Done. 1 :: Error.

Full manual

This page explains the command in simple words. The original manual has every detail.

In your terminal: man uptime