Skip to content

How to find out the date an Arch system was installed?

I've seen various suggestions like checking for the oldest file in the root directory, or /etc, or /boot, and that it should indicate the installation date. But is there a more reliable or 'guaranteed' way to tell what date the installation happened?

30 points30 comments
Open on Reddit
About this post
Posted
Archived
Score
30 · 100% up
Kind
Text
ID
44fono

Author

109
posts
183
comments
0
media
View profile

33 comments

Measure the length of your beard, divide by 6" per year.

:-)

43 points

no that’s not it. had something to do with slicing the machine open and counting the rings.

5 points

head /var/log/pacman gets you the date when first packages where installed, if you not cleared your logs.

27 points

had to add .log onto that to get results, works well, thank you.

9 points

Arch used to use installer images instead of the current installation method, so if your installation is very, very old, this isn't reflective of the installation date.

2 points

I'm not sure when the switch was; pre-2011 though.

1 points
  1. tune2fs -l /dev/sdX1 | grep created
  2. tune2fs -l /dev/sda1 or /dev/sdb1* | grep 'Filesystem created:'
  • = In the first column of df / you can find the exact partition to use.
10 points

Not necessarily reliable, if you don't know the history of the physical item. Filesystems might have been changed, such as adding encryption, or copying system across to a new disk.

2 points
cat /var/log/pacman.log | grep base   
4 points

This is a typical useless use of cat. You should better directly use grep:

grep base /var/log/pacman.log

Furthermore, as already suggested, you should better retrieve the first log entry using head -n1.

28 points

Thats true and I've heard it before. But using cat (or other commands) then pipe the output is more intuitive to my thinking. It uses more characters but it's not wrong eighter. Just my preference.

13 points
unknown author

Deleted before we saved it.

1 points
$ sudo lvscan
  --- Logical volume ---
  LV Path                /dev/arch/home
  LV Name                home
  VG Name                arch
  LV UUID                yW5hyk-7bTX-QdN4-Fry1-hQLQ-gM1V-0t4NqQ
  LV Write Access        read/write
  LV Creation host, time archiso, 2014-07-21 15:23:24 -0700
  LV Status              available
  # open                 1
  LV Size                115.92 GiB
  Current LE             29675
  Segments               4
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
1 points

A non-distro specific solution might be. stat / The Access timestamp should be the date.

1 points

As /lib is a symlink it won't get its time updated unless it's recreated. Assuming your system time was correct when you installed your system it should be set to install time. Just do: ls -l /lib

0 points

That gives me 2015-09-30 21:17:54, but if I do head /var/log/pacman.log like the other suggestion it shows 2015-09-16 11:26, which is 2 weeks off. How could these 2 things be showing such different times?

3 points

I just checked. It looks like some package changes do actually change /usr although I can't imagine why. /var/log/pacman.log seems a better bet.

5 points

That gives me 2015-09-30 21:17:54

I get the same time (Sep 30 21:17), so it can't be right.

3 points

this actually won't work very well. They changed the lib hierarchy sometime in 2012 - so for any installation older...

1 points
unknown author

Deleted before we saved it.

-4 points
unknown author

Deleted before we saved it.

-4 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.