Find last reboot time and date on linux

Scenario / Question:

How do I find out the last reboot or shutdown time and date of a linux system.

Solution / Answer:

The utility called LAST will provide the last reboot or shutdown time and date, and also list the sessions of users logged in at a specific date and time.

LAST Reboot

There are actually two ways of displaying the last system boot.

Using the WHO command and the “-b” option:

$ who -b
 system boot  2009-01-22 10:33

Using the LAST command will show the last reboot and the last logged in users, with time and date:

$ last reboot
 wtmp begins Mon Feb  2 12:59:22 2009

Using the LAST command to show last shutdown time and date:

$ last shutdown
 wtmp begins Mon Feb  2 12:59:22 2009
Fabio Milano has written 80 articles for us. Fabio Milano is a certified RHCE, MCP, and CFOI. He runs an IT consulting and services company called RDS Support inc. Website:http://www.rdssupport.com
The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

1 Comment so far

  1. Mike on November 5th, 2009

    How about the user who restarted the linux box. And remote IP(if user used ssh)

Leave a reply