How do I find how long ago a Linux system was installed?
sudo tune2fs -l /dev/sda1 **OR** /dev/sdb1* | grep 'Filesystem created:'
This will tell you when the file system was created.
* = In the first column of df /
you can find the exact partition to use.
Check the date of the root filesystem with dumpe2fs. I can't really think of how that could be anything other than the date you're looking for:
dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'
There are a few dates lying around.
- All files have dates.
- Log files have dates in them.
On Debian or Ubuntu and their derivatives, see /var/log/installer/syslog
for the definitive answer if it exists it is part of the log of the instillation.
But beware this is not guaranteed. (see other answers/comments for some of the reasons it may not work.)