How to use uptime command in Ubuntu Linux with examples

programmer 1653351 640
programmer 1653351 640

This brief tutorial shows students and new users how to use the uptime command in Ubuntu to tell how long a system has been running.

On Linux systems, including Ubuntu, the uptime command gives a one-line display of how long a system has been running, logged-in users, system loads and current time.

If you’re a student or new user looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners and folks looking for easier Linux distribution to use.

Ubuntu is an open-source Linux operating system that runs on desktops, laptops, servers, and other devices.

About uptime command:

The uptime command gives you a one-line display of how long a system has been running as well as who is logged in to the system, system loads for the past 1, 5, and 15 minutes and current time.


The syntax is the rule and format of how the uptime command can be used. These syntax options can be reordered, but a straight format must be followed.,.

Below is an example syntax of how to use the uptime command.

uptime [options]


The command line options are switches or flags that determined how the commands are executed or controlled. they modify the behavior of the commands. they are separated by spaces and followed after the commands.

Below are some options for the uptime command:

 Options:Replace Options: with the options to run with the uptime command
 -p, –prettyUse the -p, –pretty option to show uptime in pretty format
 -s, –since  Use the -s, –since option display system up since [TIME]
 -h, –helpDisplay a help message and exit.
 -V, –versionoutput version information and exit

The uptime command uses the /var/run/utmp file to display information about who is currently logged on.

It uses the /proc directory to display information about system processes.

Simply run the uptime command to invoke it.

For example, when you run the uptime command, it shows a similar line as shown below:

14:26:07 up 500 days,  1 user,  load average: 0.17, 0.14, 0.13


  • 14:26:07: Current time of the system which translates to 2:26 PM
  • up 500 days: The system has been up for 500 days
  • 1 user: 1 user is logged in to the system
  • load average: system load average

The update command is simple but useful if you need quick information about how long a system has been running since the last reboot.


This post shows you how to use the uptime command on Ubuntu to display brief information on how long a system has been running since the last reboot.

If you find any error above, please comment below to alert us.

Posted by
Richard W

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: