I need to find PC uptime from the day of installation until now.

Is this logged somewhere? Does any file log this cumulative uptime?

  • First day since manufacture? – daisy Dec 26 '12 at 8:37
  • No, First day from OS installation(ubuntu) – Chalist Dec 26 '12 at 9:12
  • 1
    What is the actual problem you are trying to solve? – jippie Dec 26 '12 at 10:13
  • @jippie I need to find PC uptime from first ubuntu installation day until now for loggin in my Company. – Chalist Dec 26 '12 at 11:01
  • @chalist no you can't. – Ulrich Dangel Dec 26 '12 at 12:31

As log-files are usually deleted after some time, the total up-time is difficult to get.

If the hard disk is as old as the PC, the RAW value (last number) of

smartctl  -a /dev/sda | grep Power_On_Hours

could give a rough estimate how many hours the PC was used.

  • I tried. Not worked. – Chalist Dec 26 '12 at 9:16
  • @chalist As you're using Ubuntu, you'll also find this information via the GUI Disk Utility, but it will give you the uptime since manufacture, not since installation. – Bernhard Dec 26 '12 at 9:27
  • @Bernhard I will PC uptime not Disk creation time. – Chalist Dec 26 '12 at 11:14
  • @chalist I know, therefor my remark, but I commented because it adds something to the answer given by – Bernhard Dec 26 '12 at 11:30
  • 2
    @chalist As I wrote in my answer: The last number in the line shows how many hours your harddrive was on. Therefore: 4583 hours = ~ 191 days. – jofel Dec 26 '12 at 17:13

If you want to keep track of this -from now on- you can use uptimed

It's available as package in Ubuntu and Fedora and probably other distributions as well.


If you have some server, use commands like:

$ uptime 
$ w
$ last

HDD SMARTCTL is also good try.

Also from installation could be information about date created of some files in filesystem. Think about, which files were created with installing of your system?

If you have linux, look at the date of creation of your /root/ directory. If you have windows, it will be worse...


Install tuptime, since that moment, you will have a track of the system uptime.


  • Indeed, is the better tool to find the historical uptime. – Rfraile Dec 19 '17 at 21:09

Depending on the filesystem, the superblock might have the date the filesystem was created. You'd want to check the root filesystem. There is more information here

  • Not really related to the asked uptime. – manatwork Dec 28 '12 at 8:18
  • I inferred that he meant the time the system was installed, since he kept referring to installation. The actual uptime is easily obtained. – Tim B Dec 30 '12 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.