1

I have a raspberry pi but I do not recall when I set it up. I am trying to find this out. I have tried the suggestion in the following question:

https://unix.stackexchange.com/questions/9971/how-do-i-find-how-long-ago-a-linux-system-was-installed

(summarized as sudo tune2fs -l /dev/mmcblk0p2|grep 'Filesystem created' ).

This only shows when the raspbian image was created by the foundation.

John Smith
  • 1,251
  • 3
  • 18
  • 27

2 Answers2

2

Find /var/log/syslog. This file has likely been rolled over, and the old versions will have suffixes that are either plain numbers or dates. Find the oldest one by modification time:

ls -l /var/log/syslog.*

Start skimming it from the beginning. Because the Pi doesn't have a clock, the first dates you will find will be Dec. 1969. The first realistic date will be the first one the OS was aware of.

Note that depending how old the installation is, the oldest archived logs may have been purged.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
2

The most effective way I have found is using the command

passwd -S

This works if you only changed your password on the day it was setup.

John Smith
  • 1,251
  • 3
  • 18
  • 27