Tuesday, May 17, 2011

Find out Last reboot / shutdown time in Linux


Here is the method:
There are actually three ways of displaying the last system boot.


The command called LAST will provide the last reboot or shutdown time and date.


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


# last reboot
 wtmp begins Fri Apr  15 12:39:32 2011

# last shutdown
 wtmp begins Fri Apr 15 12:39:32 2011

The LAST command also lists the sessions of users logged in at a specific date and time as well.



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


$ who -b
 system boot  2011-04-15 12:39


You can also use "uptime" command to know the server uptime.

No comments:

Post a Comment