Steps-find-Installation-date-Operating-system-installed-Linux-CentOS-RedHat

Steps to find the Installation date of a Operating system installed Linux CentOS and Red Hat

Steps to find the Installation date centos of a Operating system installed Linux CentOS and Red Hat

On a CentOS or RedHat based Operation system You can easily find the date and time of the Server is installed.

Method 1 :  Using, rpm command to find the basesystem and using the basesystem information we can use rpm -qi to find Date and time.

Step 1 : First get the basesystem rpm by the below command.

rpm -qa | grep basesystem

eg. result below.

root@earn [~]# rpm -qa|grep basesystem
basesystem-8.0-5.1.1.el5.centos

Step 2 : Copy the whole basesystem version number and input the below command.

rpm -qi

eg. base on the above example

root@earn [~]# rpm -qi basesystem-8.0-5.1.1.el5.centos

Name : basesystem Relocations: (not relocatable)
Version : 8.0 Vendor: CentOS
Release : 5.1.1.el5.centos Build Date: Wed 28 Mar 2007 09:28:19 AM IST

Install Date: Wed 05 Dec 2014 10:50:41 AM IST Build Host: xxxxxxxxx

Group : System Environment/Base Source RPM: basesystem-8.0-5.1.1.el5.centos.src.rpm
Size : 0 License: public domain
Signature : DSA/SHA1, Wed 04 Apr 2007 05:50:20 AM IST, Key ID xxxxxxxxxxxxxxx
Summary : The skeleton package which defines a simple CentOS Linux system.
Description :
Basesystem defines the components of a basic CentOS Linux system (for
example, the package installation order to use during bootstrapping).
Basesystem should be the first package installed on a system, and it
should never be removed.

Another method to find and get the instalaltion aate of Operating system CentOS/Red Hat

Method 2 :
Using the Partition created Date on the Linux Environment.

We can also use tune2fs command

Step 1 : first type df -h

sbadmins@earn [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 39G 1.6G 36G 5% /
/usr/tmpDSK 3.4G 92M 3.1G 3% /tmp

Step 2 : use the below command to get the date teh filesystem created 🙂

tune2fs -l /dev/sda2

You can also use GREP command to filter the whole result.

sbadmins@earn [~]# tune2fs -l /dev/sda2 | grep created
Filesystem created: Wed Dec 5 16:19:37 2014

Comments

This site uses Akismet to reduce spam. Learn how your comment data is processed.