Uptime is a command that returns information about how long your system has been running together with the current time, number of users with running sessions, and the system load averages for the past 1, 5, and 15 minutes. It can also filter the information displayed at once depending on your specified options.
uptime uses a simple syntax:
# uptime [option]
You can run the uptime command without any options like so:
It will display an output similar to:
09:10:18 up 106 days, 32 min, 2 users, load average: 0.22, 0.41, 0.32
In order of appearance, the command displays the current time as the 1st entry, up means that the system is running and it is displayed next to the total time for which the system has been running, the user count (number of logged on users), and lastly, the system load averages.
Check Linux Server Uptime
You can filter uptime’s result to show only the running time of the system with the command:
# uptime -p up 58 minutes
Check Linux Server Starting Time
Using option -s will display the date/time since when the system has been running.
# uptime -s 2019-05-31 11:49:17
Uptime Version & Help
As it is with most command line apps, you can display uptime’s version information and quick help page with the following command.
# 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).
Having gotten to this point in the article, you can now use uptime for your daily runs and you’ll determine its level of usefulness to you. If you have any doubts, here’s its man page.