Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

How to find the last uptime of Linux OS

Hello, I am wondering what should be the way to find the duration of last update of Linux OS. I can see that currently my box is UP by 20 days, now I would like to know for how many days it was UP before the last reboot. Is there a way to find it out? Thanks!
Avatar of billfusion

I have to admin that I have not touched a linux box in a long while but if you look at  /var/log for boot.log files, it should show you the date those files were created which is at boot time.  Assuming your machine has not been off for any extended period of time then the create dates for those files (boot.log, boot.log.1, boot.log.2, ...) should tell you when the machine have been rebooted (or more accurately: booted)
last reboot

  Then see the close reboot times.
Avatar of wesly_chen
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of beer9


Thank you! :-)