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:


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

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

  • 2
    Just out of curiosity why is this important? Commented Jan 6, 2017 at 1:03
  • @SteveRobillard I don't understand the purpose of your question so I cannot answer it.
    – John Smith
    Commented Jan 6, 2017 at 1:26
  • 1
    Why do you need to know the date the system was setup? What value des this have? How are you planning to use this date? Commented Jan 6, 2017 at 1:30
  • That command shows when the disk (SD card in this case) was formatted and assumes the system was installed right after that. If that is not what you are after, then you need to clarify what you mean by "when I set it up".
    – SiKing
    Commented Jan 6, 2017 at 15:54
  • 1
    @SiKing . The command seems to show when the disk image was created at the raspberry pi foundation. I have several machines which I created over a time period and they all have the same date because they were built from the same disk image.
    – John Smith
    Commented Jan 6, 2017 at 16:30

2 Answers 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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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