LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to find out when the linux was installed on my system (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-out-when-the-linux-was-installed-on-my-system-4175524339/)

piyush128k 11-04-2014 03:26 PM

how to find out when the linux was installed on my system
 
i need to know when a linux distro was installed on the system

repo 11-04-2014 03:30 PM

Try
Code:

tune2fs -l /dev/sda1 | grep 'Filesystem created:'
Kind regards

smallpond 11-04-2014 04:39 PM

Cool. Works on raid or logical volumes too:
Code:

tune2fs -l /dev/mapper/d2vg-lv1 |grep 'Filesystem created'
Filesystem created:      Tue Nov  4 15:39:59 2014


piyush128k 11-04-2014 05:22 PM

i do df -h and i see the file systems listed e.g.

[root@slcac810 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 48G 2.9G 43G 7% /
/dev/sda1 190M 73M 108M 41% /boot

so i do this:- tune2fs -l /dev/mapper/d2vg-lv1 |grep /dev/sda
and it doe snot work.

Could you be kind enough to give me an example that i could understand. I believe i am probably doing something really stupid that it is not working

astrogeek 11-04-2014 05:52 PM

Quote:

Originally Posted by piyush128k (Post 5264600)
so i do this:- tune2fs -l /dev/mapper/d2vg-lv1 |grep /dev/sda
and it doe snot work.

Could you be kind enough to give me an example that i could understand. I believe i am probably doing something really stupid that it is not working

Why not try the really clear method suggested above?

Think...

Teufel 11-04-2014 05:56 PM

Quote:

Originally Posted by piyush128k (Post 5264600)
i do df -h and i see the file systems listed e.g.

[root@slcac810 /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 48G 2.9G 43G 7% /
/dev/sda1 190M 73M 108M 41% /boot

so i do this:- tune2fs -l /dev/mapper/d2vg-lv1 |grep /dev/sda
and it doe snot work.

Could you be kind enough to give me an example that i could understand. I believe i am probably doing something really stupid that it is not working

Obviously you have no "/dev/mapper/d2vg-lv1" device, so you getting an error.
You need to run
Code:

tune2fs -l /dev/sda2 | grep 'Filesystem created:'
it will show the filesystem creation date. In most cases this date is the date when system installation was started.

piyush128k 11-04-2014 06:01 PM

Thank you..so dumb of me. thank you sir


All times are GMT -5. The time now is 06:16 PM.