Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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?

share|improve this question

1 Answer 1

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).

share|improve this answer
great answer, I add | tail -10 – enzotib Apr 26 '11 at 19:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.