How to Check System Uptime and View Detailed Reboot History in Ubuntu

System stability and service availability are paramount when administrating Ubuntu Linux servers and production cloud instances. When investigating an unexpected outage, auditing maintenance reboot cycles, or validating that a scheduled kernel security update was successfully applied, systems administrators need reliable tools to inspect how long a machine has been running and when previous reboots occurred. In Ubuntu, several native terminal utilities query kernel runtime accounting files to provide instant uptime and reboot telemetry.

Checking Instant System Uptime with uptime

The most straightforward method to evaluate runtime and current system stress is the uptime command:

  1. Launch your terminal or connect to your remote Ubuntu instance over SSH.
  2. Execute the basic uptime command:
    uptime
  3. The terminal outputs a single concise status line:
     22:45:10 up 42 days, 3:14,  2 users,  load average: 0.18, 0.22, 0.15

The output reports current system time, total elapsed runtime since the last boot (e.g. 42 days, 3 hours, 14 minutes), count of active logged-in user sessions, and CPU load averages over the past 1, 5, and 15 minutes.

Filtering for Human-Readable and Timestamp Output

You can adjust the output format using flags:

  • Pretty Output (-p): Suppresses load metrics to print only the plain elapsed duration:
    uptime -p
    Output: up 6 weeks, 1 day, 3 hours, 14 minutes
  • Exact Boot Timestamp (-s): Displays the precise date and second the system completed its initial boot sequence:
    uptime -s
    Output: 2026-09-15 19:31:00

Auditing Historical Reboots and Shutdowns with last

The last utility reads the /var/log/wtmp accounting file to reconstruct historical reboot and shutdown events across weeks or months of operation:

  1. To list all historical reboot events in reverse chronological order:
    last reboot
  2. The output details the kernel version active during each boot, login type, start timestamp, and total operational duration:
    reboot   system boot  6.8.0-45-generic Tue Oct 20 04:12   still running
    reboot   system boot  6.8.0-40-generic Mon Oct 12 18:30 - 04:10  (7+09:40)
    reboot   system boot  6.8.0-40-generic Sun Sep 15 19:31 - 18:25 (26+22:54)
  3. To audit clean system shutdowns rather than reboots, run:
    last -x shutdown
  4. To inspect the last 5 reboots specifically:
    last -n 5 reboot

Inspecting Reboot Causes via systemd Journal

If a server rebooted unexpectedly without an operator initiating a clean shutdown, inspect the preceding system journal messages to determine whether a power failure, kernel panic, or automated watchdog triggered the restart:

journalctl -b -1 -e

This command loads the final log lines from the previous boot cycle (-b -1), allowing you to pinpoint hardware faults or out-of-memory kernel kills immediately preceding the reboot.

Get the best tech tips delivered straight to your inbox.

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