Avatar of beer9
beer9
Flag 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!
Linux

Avatar of undefined
Last Comment
beer9

8/22/2022 - Mon
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)
wesly_chen

last reboot

  Then see the close reboot times.
ASKER CERTIFIED SOLUTION
wesly_chen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
beer9

ASKER
Thank you! :-)
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes