How to check the last time system was rebooted on Linux

Last updated on July 17, 2020 by Dan Nanni

Question: Is there a way to quickly check how long a Linux system has been running? That is, how can I find out the last time a Linux system was rebooted?

There are several ways to find out the last system reboot time.

Method One: last

The first method is to use last command.

$ last reboot

This command actually shows system uptime for the last few days. Originally the last command is designed to show login history of a particular user. In Linux, a special "pseudo user" named reboot automatically logs in to the system right after the system has rebooted. Thus by checking the login history of reboot user, you can check the last reboot time.

Method Two: who

Another command to check the time of last system boot is to use who command with -b option.

$ who -b

Method Three: uptime

You can also use uptime command to deduce last reboot time. The uptime command shows you the current time, as well as how long the system has been running. From this information, you can calculate the time when the system was last booted.

$ uptime

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean