How to Check Linux Uptime Using the Command Line

The uptime is the total amount of time a Linux system has been continuously running since its last restart. Let’s learn how to check Linux uptime using the uptime command.

Display Standard Uptime

To display the system uptime, just open your terminal, type uptime, and press enter. Root privileges are not necessary to perform this check.

$ uptime
01:02:00 up 1 day,  7:01,  1 user,  load average: 0.12, 0.09, 0.05

Display Uptime in a Pretty Format

If you want to display the uptime in a more readable, pretty format, use the uptime command with the -p command line option.

$ uptime -p
up 1 day, 7 hours, 5 minutes

Display Since When the System is Running

If you want to specifically display just the exact date and time since when the Linux system has been running, use the uptime command with the -s command line option.

$ uptime -s
2020-09-14 18:00:05

Check the Version and Help Information

Use the uptime command with the -V command line option to display the version information of the utility.

$ uptime -V
uptime from procps-ng 3.3.12

If you need further assistance or want to see all available flags, use the uptime command with the -h command line option to display the help menu.

$ uptime -h

Usage:
 uptime [options]

Options:
 -p, --pretty   show uptime in pretty format
 -h, --help     display this help and exit
 -s, --since    system up since
 -V, --version  output version information and exit

For more details see uptime(1).

Leave a Reply

Your email address will not be published. Required fields are marked *