23

I need to know when my server was rebooted? I only see my last login when I login.

Where is this info stored?

3 Answers 3

33

You can use last to see login information. To know about system reboot, enter in a terminal,

last | grep reboot

or simply,

last reboot

as mentioned by RebootDeluxe in the comment.

2
  • last | grep reboot does not work (anymore). It gives me no answer. Only last reboot works. As mentioned in answer from @dimidak I use Ubuntu 16.04.7 LTS Apr 8 at 11:27
  • @RebootDeluxe last | grep reboot is still working for me on Ubuntu 20.04.6 LTS. Without more information, I cannot say why it is not working for you. I am adding your method to the original post. Sorry for the delayed response.
    – sourav c.
    Apr 20 at 6:27
14

You can run the uptime command from the console to see how long the server has been running. This will give the total amount of time since the last reboot.

1
  • 1
    thank you, funny that I didn't know that command yet. Happy that I now added it to my brain hard drive
    – Private
    Apr 2, 2014 at 20:01
9
  • who -b
  • uptime
  • last reboot
  • ll /var/log/ | grep boot.log

You must log in to answer this question.

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