How to Check Your System Uptime in Ubuntu Linux Terminal

Whether you want to check how long your server has been running without a reboot, verify that a scheduled restart took place at the correct time, or simply satisfy your curiosity about your personal laptop’s runtime, checking system uptime is one of the most basic and frequently used skills in Linux system administration. In Ubuntu, several simple terminal commands give you this information in different formats — from a quick one-liner to a detailed breakdown with CPU load averages.

Why Uptime Matters

Uptime is not just a vanity metric. It provides practical operational information:

  • Server health monitoring: A web server or database server with unexpectedly low uptime may indicate crashes, kernel panics, or automatic restarts triggered by critical errors.
  • Pending updates: Linux servers that have been running for many months without a reboot may have critical kernel security updates installed but not yet applied (as kernel updates require a reboot to take effect).
  • Performance context: The system load averages shown alongside uptime indicate whether your machine is currently overloaded, helping you diagnose performance issues in context.

Method 1: The uptime Command

The standard uptime command is the most common tool and provides the most information in a single line.

  1. Open your Terminal application (press Ctrl + Alt + T on the desktop, or SSH into your server).
  2. Type the following and press Enter:
uptime

The output will look similar to this:

 14:30:05 up 12 days,  4:22,  2 users,  load average: 0.15, 0.22, 0.25

Reading the output from left to right:

  • 14:30:05 — the current system time.
  • up 12 days, 4:22 — the system has been running continuously for 12 days, 4 hours, and 22 minutes.
  • 2 users — there are currently 2 user sessions logged in (locally or via SSH).
  • load average: 0.15, 0.22, 0.25 — the average CPU load over the past 1, 5, and 15 minutes respectively. A load of 1.0 on a single-core system means 100% utilisation. On a 4-core system, a load of 4.0 means full utilisation.

Method 2: Human-Readable Format (uptime -p)

If you only need the duration and want a clean, plain-English sentence without the extra technical details:

uptime -p

Output example:

up 12 days, 4 hours, 22 minutes

This format is particularly useful when displaying uptime in scripts or monitoring dashboards where you want a simple, readable value.

Method 3: Finding the Exact Boot Time (uptime -s)

Instead of calculating backwards from the elapsed time, you can ask the system to tell you the precise date and time it was last started:

uptime -s

Output example:

2024-10-24 10:08:05

This gives you the exact timestamp (year-month-day hour:minute:second) when the system last booted. This is the most definitive way to confirm when a server was last restarted.

Method 4: Checking Uptime Inside top or htop

If you are already monitoring your system’s live performance using the top or htop command, you do not need to run a separate uptime check. Both tools display the system uptime prominently in the header section at the very top of their interface, updating in real time alongside CPU usage, memory usage, and running process counts.

Type top or htop in the terminal to launch the interactive process viewer. The uptime is displayed on the first line of the header.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.