Introduction:

For debugging and maintenance purposes, finding out how long a system has been online can prove useful. Using the command line interface (CLI), determining the system’s uptime or the time it has been powered on, can be done by a simple command.

Requirements:

A command line interface/shell on Windows or Linux.

Procedure:

Windows

  • Once at the command line interface, type the following:
    net stats srv
  • In the output, you will see something analogous to:
    Statistics since month/day/year hh:mm:ss AM/PM
  • This is how long the system has been online.

Linux

  • Once at the command line interface, type the following:
    uptime
  • You should see something analogous to the following:
    hh:mm:ss up x days, hh:mm, x users, load average: x, x, x
  • This gives you the current time, then how many days, hours, and minutes the system has been powered on.
More Information:

On Linux, you can type:

man uptime