Linux Uptime Command

uptime [options]

The uptime command shows how long the system has been running. It also displays the current time, the number of logged-in users, and the system load averages for the past 1, 5, and 15 minutes.

How to Use the Uptime Command

Invoke the uptime command with no options to display the system's uptime.

uptime

Sample output:

11:51  up 76 days, 16:53, 10 users, load averages: 1.91 2.04 2.44
  • 11:51 - The current system time.
  • up 76 days, 16:53 - The length of time the system has been up.
  • 10 users - The number of logged-in users.
  • load averages: 1.91 2.04 2.44 - System load averages for the past 1, 5, and 15 minutes.

Uptime options

The -p, --pretty option tells uptime to display the output in a pretty format:

uptime -p

Output

up 1 year, 21 weeks, 5 days, 12 hours, 25 minutes

The -s, --since option shows the date and time since the system is up:

uptime -s

Output

2021-02-01 13:23:12