Linux Commands - Display how long server has been running using the uptime command

by
Jeremy Canfield |
Updated: October 06 2023
| Linux Commands articles
The uptime command displays the current time, how long the server has been running since it was last rebooted, how many users are signed into the server, and the server's load average.
02:37:41 up 1 day, 23:55, 1 user, load average: 0.05, 0.06, 0.14
The -p or --pretty option can be used to make the output easy to read.
uptime -p
. . .
up 1 day, 23 hours, 56 minutes
The -s or --since option can be used to determine when the system was last restarted.
uptime -s
. . .
2020-03-15 02:37:19
Similarly, the who command with the --boot flag can be used to show when the server was last rebooted.
[root@server1 ~]# who --boot
system boot 2017-04-14 17:48
Did you find this article helpful?
If so, consider buying me a coffee over at