• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to find when Operating system was installed in linux CentOS and Red Hat

June 18, 2013 by Sharad Chhetri Leave a Comment

How to find when Operating system was installed in linux CentOS and Red Hat

This is a short video to know how you can find out on which date the linux was installed.
It is applicable to Red Hat based linux distro.

Step 1 : First find out the basesystem rpm.

rpm -qa|grep basesystem

Step 2: Now copy the complete basesystem version no. and hit the below given command .
The output will show many info. See the “Install Date” , this is the date when OS was installed.

rpm -qi 

Note: This is applicable when you have done fresh installation without using any image. For eg. the case is not applicable if you are checking in VPS (Virtual Private Server).

Below given is another method which is sure shot case to case

Another method for finding Install Date of Linux Operating system (CentOS and Red Hat)

Here the logic is Linux OS is installed in / root partition. So we will see when the partition was created which is equivalent to when Linux was installed.

We will use tune2fs command

Step 1: First do “df -Th” to get info where the / is mounted. In below given example / is mounted in /dev/sda5 (In your Linux OS it would vary)

linux@tuxworld:/tmp$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        28G   25G  1.6G  95% /
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           796M  980K  795M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G   12M  2.0G   1% /run/shm
none            100M   56K  100M   1% /run/user
cgroup          2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda7       9.2G  8.9G     0 100% /partition7
/dev/sda8        46G   41G  3.1G  93% /partition8
/dev/sda9        74G   40G   31G  57% /partition9
linux@tuxworld:/tmp$ 

Step 2 : Use the command tune2fs.

tune2fs -l /dev/sda5

The below given is with grep command.

root@tuxworld:~# tune2fs -l /dev/sda5 |grep  'Filesystem created'
Filesystem created:       Sat Feb 18 22:47:25 2012
root@tuxworld:~#

Here “Sat Feb 18 22:47:25 2012” is OS installation date

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Find Linux Operating System architecture installed on system
  2. Recover Linux Grub Password in linux rescue mode CentOS/Red Hat
  3. How to add/install Ubuntu fonts in CentOS/Red Hat Linux
  4. make command not found in linux CentOS Red Hat ubuntu Debian
  5. Install MySQL Server 5.6 in CentOS 6.x and Red Hat 6.x Linux
  6. netstat command not found on CentOS 7 and RHEL 7 (Red Hat Enterprise Linux 7)
  7. Set GRUB password after installation of CentOS/Red Hat
  8. Password prompt in single user mode is not secure : CentOS/Red Hat
  9. Command to create and delete group in Red Hat and CentOS linux
  10. scp command not found in CentOS and Red Hat

Filed Under: Linux, Tips And Tricks Tagged With: linux, tips

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Linux Commands

How to print particular line number by using sed command

Learn Linux Date Command With Examples

How to show line numbers with less command in Linux

sed : find the pattern (keyword) and delete the line from file

Linux : clear command and its keyboard shortcut

How to rename and move the directory and files in linux

Linux command : To create new directory/folder

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

Do not show line haveing particular keyword by grep command

How to zip directory in linux explained with examples

safest method to remove softlink in linux

Allow only members of Wheel group to use su command on RHEL/CentOS

postgres database backup script using database user password inside

Error installing rails

How to change login banner message in GUI mode in CentOS 6 or above version.

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy