Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING BASH

Bash uptime Command

Using the uptime Command

The uptime command is used to find out how long the system has been running.

It provides a quick overview of the system's performance, including:

  • The current time
  • How long the system has been up
  • The number of users logged in
  • The system load averages for the past 1, 5, and 15 minutes


Syntax

The basic syntax of the uptime command is:

uptime

This command displays information like the current time, uptime duration, number of users, and load averages.


Understanding the Output

The output of the uptime command shows information like:

  • Current Time: The time at which the command was run.
  • Uptime Duration: How long the system has been running since the last reboot.
  • Number of Users: The number of users currently logged into the system.
  • Load Averages: The system load averages for the past 1, 5, and 15 minutes.

Example Output

Here's an example of the uptime command output:

Example: Understanding Uptime Output

uptime
 14:36:01 up 10 days,  3:45,  4 users,  load average: 0.75, 0.60, 0.50

In this example:

  • The current time is 14:36:01.
  • The system has been up for 10 days, 3 hours, and 45 minutes.
  • There are 4 users currently logged in.
  • The load averages are 0.75, 0.60, and 0.50, indicating the system load over the last 1, 5, and 15 minutes.

Interpreting Load Averages

The load averages provide a snapshot of the system's workload:

  • A lower load average indicates a less busy system.
  • A higher load average suggests the system is busier.
  • Load averages above 1.0 per core may indicate the system is overloaded.

Example: Interpreting Load Averages

load average: 0.75, 0.60, 0.50

In this example, the system load is decreasing over time, indicating that the system is becoming less busy.


Common Uses

The uptime command is commonly used to:

  • Monitor system performance and stability.
  • Quickly check how long the system has been running.
  • Assess system load and determine if the system is under heavy use.


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.