This page looks best with JavaScript enabled

Find out OS installation date

 ·  🎃 kr0m

Surely on more than one occasion we have wondered on what date the system in front of us was installed, with this simple trick we can find out by consulting the creation date of the root file system.

  • ZFS-FreeBSD:
    We check the system’s zpools:

    zpool list

    NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
    zroot   928G  99.3G   829G        -         -     9%    10%  1.00x  ONLINE  -
    

    We obtain the creation date of the zpool:

    zpool history zroot | grep 'zpool create'

    2020-11-27.23:58:25 zpool create -o altroot=/mnt -O compress=lz4 -O atime=off -m none -f zroot nvd0p4
    
  • Ext4-Linux:

    We look for the partition where root is mounted:

    mount | grep 'on / '

    /dev/sda4 on / type ext4 (rw,relatime,discard,data=ordered)
    

    We obtain the creation date of the file system:

    tune2fs -l /dev/sda4 | grep 'created'

    Filesystem created: Tue Oct 25 08:47:17 2016
    
If you liked the article, you can treat me to a RedBull here