1

I'd like to find out (ideally via terminal) how long my operating system (Ubuntu 12.04 LTS) has been installed - either that or the date on which the installation took place. Is this possible? If so, how can it be accomplished?

Rich Jenks
  • 113
  • 3

1 Answers1

2

If you are confident the hardware clock was correct at the time Ubuntu was installed, you can look at the files in /var/log/installer, specially /var/log/installer/syslog:

$ sudo head -n1 /var/log/installer/syslog
May 27 19:03:08 ubuntu kernel: imklog 5.8.11, log source = /proc/kmsg started.
Eric Carvalho
  • 54,385
  • Thanks! Would you mind explaining the command? I'm very new to linux and the terminal. – Rich Jenks Jul 04 '13 at 19:05
  • @RichJenks sudo gives you root (administrative) privileges, because that file's default permissions allow only root to read it. head shows the first lines of a file (/var/log/installer/syslog), in this case only the first one (-n1). I wrote that command for the sake of simplicity. You could've used any tool to see the content of that file: sudo cat /var/log/installer/syslog to show the entire content, sudo less /var/log/installer/syslog to show the content in a scrollable way, sudo more /var/log/installer/syslog to show the content paginated, etc. – Eric Carvalho Jul 04 '13 at 19:12