Monday, 18 January 2021

How To Find Operating System Installation Date and Time in CentOS 8

Sometimes, there is a requirement to know operating system installation/build information. The tune2fs Linux command uses to adjust various tunable file system parameters on Linux ext2, ext3, or ext4 file systems. This command also helps to find out the date and time of operating system installation. This article describes, How to Find Operating System Installation Date and Time in CentOS 8.
Step 1: Get the Partition Details: Run the following command to get the /boot partition details:
[root@linuxcnf ~]# df -hT /boot
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda1      ext4  976M  250M  659M  28% /boot
[root@linuxcnf ~]#
In the above output, the /dev/sda1 is a mounted on /boot. Replace /dev/sda1 with correct hard drive partition.
Step 2. Find out OS Installation Date & Time: Run the following command tune2fs to get the OS installation/File system creation date and time. 
[root@linuxcnf ~]# tune2fs -l /dev/sda1 | grep 'Filesystem created:'
Filesystem created:       Fri Apr 24 07:19:12 2020
[root@linuxcnf ~]#
Done! The above command will display the OS installation/filesysmes created date and time.

No comments:

Post a Comment