I'm a Rails developer working on a web application on Ubuntu Server 10.04. Due to internal requirements, I was asked to find the last 10 system boot and shutdown times... I have no clue where to find these details. Could someone help me out?

2 Answers 2


Use the last command.

last -x | grep shutdown
last -x | grep reboot

You can pipe this to the head to read the last n instances. For example, in your case:

last -x | grep shutdown | head -n 10

You also should set


in the /etc/default/bootlogd file (it could be No by default).


For a GUI method you can use hardinfo as described here: Does Ubuntu have a "device manager" equivalent? And what is an easy way to access USB drives?.

Under the section Boots you will see this:

Hardinfo boot log.png

Installation is straight forward using:

sudo apt install hardinfo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .