How to check the installation date of Linux
To find out when Linux was installed on your host, there isn’t a default command, but here are some useful tricks:
Using rpm to check installation time of basesystem
(Preferred Method):
rpm -q basesystem --qf '%{installtime:date}\n'
Using ls
and awk
commands:
ls -alct / | tail -1 | awk '{print $6, $7, $8}'
Using the stat
command on root directory:
In this method take attention to the last field ‘birth’
stat --format=%w /
Note: The “birth” field might display “-“.