Home Linux Commands How to Find Your Last Ubuntu Reboot Date & Time

How to Find Your Last Ubuntu Reboot Date & Time

Every operating system, whether being used as a personal computer or as a server, maintains a log of the shutdown, reboot, and login times. This is not only important for system administration, but also for troubleshooting problems.

In Linux, all logs are stored in the ‘/var/log/’ directory. The details about logged-in users and respective shutdown, reboot, and login times are also stored here.

Let’s see how we can find out the last reboot date and time on your Ubuntu system.

Using Last Command

We can run the command last with the parameter ‘reboot’ to get the time and date of the last reboot.

last reboot

As seen below, the list of last reboots is displayed. To just display the latest reboot, filter the output with the ‘head‘ command.

last reboot | head -1
Find Last Ubuntu Reboot Time
Find the Last Ubuntu Reboot Time

Using Who Command

The who command in Linux displays information about the logged-in user.

who

As shown below, it displays the logged-in user name, the ID (:0), the login time, and the remote or local display ID (:0).

If we execute this command with the '-b' flag, it displays the time and date of the last reboot.

who -b
Find Ubuntu Last Reboot Time
Find Ubuntu’s Last Reboot Time

Using Uptime Command

The uptime command displays the uptime of the system, i.e., how long has the system been running. It outputs in the length of time the system has been running.

uptime

We can pass the argument '-s' to output the last time the system was booted.

uptime -s
Find Running Time of Ubuntu System
Find the Running Time of the Ubuntu System

Users can also pass an argument '--since' which gives the same result as '-s'.

Using journalctl Command

You can also check detailed system logs for more information about the reboot using the journalctl command as shown.

journalctl --list-boots

This will show a list of recent boots. For more detailed logs for a specific boot, you can use:

journalctl -b <boot_id>
List Ubuntu Last Reboots
List Ubuntu’s Last Reboots
Conclusion

In this article, we looked at the ways of finding the last reboot time in Ubuntu. Apart from simply viewing the time, an advanced user/administrator can also make use of the output of the above commands in a script.

If you have any questions or feedback, make sure you leave a comment below!

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.