Home Linux Tips & TricksHow To Find the Exact Installation Date And Time Of Your Linux System (6 Methods + My Recommendation)

How To Find the Exact Installation Date And Time Of Your Linux System (6 Methods + My Recommendation)

Find Out How Long You're Running a Linux Distribution without Reinstalling It: 6 Proven Methods

By sk
Published: Updated: 146.4K views 8 mins read

I am always curious about the small details that make Linux interesting. Recently, I started wondering how long I had been using my Arch Linux system. It has been running so smoothly that I completely forgot when I installed it.

I knew it had been more than a year, but I could not remember the exact date. That led me down a rabbit hole of finding reliable ways to determine when a Linux system was installed.

Have you ever wondered how long your Linux system has been running since its last fresh installation? In this guide, I will show you a few methods to find the exact installation date and time of your Linux operating system, along with the limitations of each approach.

Finally, I share my recommended method, which I believe is the most reliable way to keep a record of your Linux installation date.

Find Exact Linux Installation Date And Time

There are a few ways to find Linux operating system's installation date and time. Here I have given all possible ways.

1. Using Stat Command

The stat command displays file or file system status in Linux and Unix-like systems. Stat command is part of GNU coreutils package, so you don't need to install it.

To check Linux OS installation date with stat command, simply run:

$ stat / | grep "Birth" | sed 's/Birth: //g' | cut -b 2-11
2021-05-20

You can also use awk with stat command to display Linux installation date as well:

$ stat / | awk '/Birth: /{print $2}'
2021-05-20

There is no need to use grep or sed or awk command. Stat command also has a built-in flag to check exact Linux installation date and time.

$ stat -c %w /
2021-05-20 17:31:10.000000000 +0530
Find exact Linux installation date and time
Find exact Linux installation date and time

As you can see in the above outputs, the installation date and time of my Fedora Linux desktop is May 20, 2021.

2. Analyze Pacman Logs On Arch Linux

If you use Arch Linux and its derivatives like EndeavourOS and Manjaro Linux, you can easily find how long have you been using it without a reinstall by analyzing the pacman logs as shown below.

$ head -n1 /var/log/pacman.log

Sample output from my Arch Linux system:

[2016-05-05 13:10] [PACMAN] Running 'pacman -r /mnt -Sy --print-format=%s --cachedir=/mnt/var/cache/pacman/pkg --noconfirm base sudo grub wireless_tools wpa_supplicant wpa_actiond netctl dialog os-prober'

As you see in the above, I am still using my first installation from May, 05 2016.

Even though Arch Linux is rolling release model, I have never had to reinstall Arch Linux. It works perfectly well without breaking anything. I have 3 Arch Linux systems (One host and two vms) over the years, and I've never had to "reinstall" even once. And, I am sure I am not going to reinstall it anytime soon.

3. Check Syslog Entries On Debian-based systems

On Debian, Ubuntu and other DEB-based systems, look in the "syslog" entries to get Linux OS installation date and time

$ sudo head -n1 /var/log/installer/syslog

Sample output:

Jul 2 10:29:10 ubuntu systemd[1]: Starting Flush Journal to Persistent Storage...

What If the logs are deleted already? No problem. You still can find out the installation time of your Linux OS by verifying filesystem creation date as shown in the following section.

4. Check Filesystem Creation Date

As stated already, sometimes, you might have deleted the logs (or enabled log rotation). In such cases, you can find the installation date like below.

Switch to root user:

$ sudo su

Now, run any one of the following commands as root user.

# fs=$(df / | tail -1 | cut -f1 -d' ') && tune2fs -l $fs | grep 'Filesystem created'

Or,

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

Or,

# dumpe2fs /dev/sda1 | grep 'Filesystem created:'

Replace /dev/sda1 with correct drive partition.

It will display when the file system was originally created.

Sample output:

Filesystem created:       Thu May 20 17:31:06 2021
Display filesystem creation date and time in Linux
Display filesystem creation date and time in Linux

These commands will work on all Linux distributions that supports ext4 filesystems.

Important Note:

The filesystem creation date should be viewed as:

"When this filesystem was created"

Not

"When this operating system was installed"

Those two dates are often identical on a fresh installation, but they can diverge significantly after upgrades, reinstalls without formatting, cloning, migrations, or snapshot restores.

For forensic accuracy, I would treat the filesystem birth time as supporting evidence, not proof of the OS installation date. In many long-lived Linux systems, there may be no completely reliable way to determine the exact original installation timestamp after years of upgrades and migrations.

5. Using Basesystem

Basesystem defines the components of a basic Fedora system (for example, the package installation order to use during bootstrapping). Basesystem should be in every installation of a system, and it should never be removed.

On Fedora, RHEL and its clones such as CentOS, AlmaLinux, and Rocky Linux, you can find Linux install date using command:

$ sudo rpm -qi basesystem

Sample output:

Name        : basesystem
Version     : 11
Release     : 11.fc34
Architecture: noarch
Install Date: Friday 23 April 2021 04:26:31 PM
Group       : Unspecified
Size        : 0
License     : Public Domain
Signature   : RSA/SHA256, Tuesday 26 January 2021 07:17:35 AM, Key ID 1161ae6945719a39
Source RPM  : basesystem-11-11.fc34.src.rpm
Build Date  : Tuesday 26 January 2021 07:15:29 AM
Build Host  : buildhw-x86-04.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
Bug URL     : https://bugz.fedoraproject.org/basesystem
Summary     : The skeleton package which defines a simple Fedora system
Description :
Basesystem defines the components of a basic Fedora system
(for example, the package installation order to use during bootstrapping).
Basesystem should be in every installation of a system, and it
should never be removed.
Find Linux install date
Find Linux install date

Or, to display the installation date only, run this:

$ sudo rpm -qi basesystem | grep Install
Install Date: Friday 23 April 2021 04:26:31 PM

Or use this command:

$ sudo rpm -q basesystem --qf '%{installtime:date}\n'
Friday 23 April 2021 04:26:31 PM

6. Using Install-date Script

There is a script named install-date, which is used to determine install date of an installation of Linux, using various methods. It currently works only on Arch Linux and Gentoo systems.

Go to the install-date repository on GitHub and download the script using command:

$ wget -O installdate.sh https://raw.githubusercontent.com/alicela1n/install-date/main/install-date

Watch out for the -O option. It must be UPPERCASE.

Make the script executable:

$ chmod +x installdate.sh

Now run the script to determine the date and time of Arch Linux installation:

$ ./installdate.sh 
2021-06-01

Better Ways to Estimate the Installation Date

No single method works perfectly. Each method works in some cases but fails in others. There is no silver bullet.

Instead, compare several sources. If you want the closest thing to the original install date, do the following checks one by one.

1. Check Installer Logs

stat /var/log/installer
ls -ld /var/log/installer

2. Check Package Database Files

stat /var/lib/dpkg/status

3. Review APT Logs

ls -ltr /var/log/apt/

4. Check the Filesystem Creation Date

sudo tune2fs -l /dev/sdX | grep "Filesystem created"

When multiple sources point to the same time period, you can usually make a reasonable estimate.

What Experienced Linux Administrators Do

Experienced administrators understand that Linux does not maintain a universal "installation date" value. Instead of searching for a single magic command, they gather evidence from several locations.

They compare:

  • Filesystem creation dates
  • Installer logs
  • Package database timestamps
  • Journal entries
  • Configuration file history

Then they draw a conclusion based on the available information.

Most importantly, they avoid claiming certainty when the evidence does not support it.

The Best Solution: Record the Linux OS Installation Date Yourself

Linux does not store a universal operating system installation date. As a result, users often rely on clues such as filesystem timestamps, installer logs, and package database files.

This is what I recommend for beginners who want a 100% reliable way to record their Linux installation date.

Document the install date yourself immediately after installation like below:

sudo date --iso-8601=seconds > /etc/install_date

This produces something like:

2026-06-15T14:22:31+05:30

Years later, you can simply print the contents of this file with command:

cat /etc/install_date

An even better approach is to add some context, as shown below:

cat << EOF | sudo tee /etc/install_date
Installation Date: $(date --iso-8601=seconds)
Hostname: $(hostname)
OS: $(grep PRETTY_NAME /etc/os-release | cut -d= -f2-)
EOF

You will get an output like:

Installation Date: 2026-06-15T20:15:55+05:30
Hostname: debian13
OS: "Debian GNU/Linux 13 (trixie)"

For servers, I would go one step further. Create a small asset record:

sudo mkdir -p /root/system-records

Add your OS installation date and time with some context:

cat << EOF | sudo tee /root/system-records/install-info.txt
Installation Date: $(date --iso-8601=seconds)
Installed By: Senthilkumar
Purpose: Mail Server
Notes: Initial deployment
EOF

Now you have:

  • Installation date
  • Who installed it
  • Why it exists
  • Any deployment notes

That's far more useful than any timestamp archaeology years later.

Conclusion

In this guide, I have listed six methods to find the exact installation date and time of a Linux distribution. I have also included a reliable way to record the installation date yourself, so you can retrieve it easily in the future.

Knowing your Linux installation date and time may not provide any direct benefits. However, it can help you determine how long you have been running a Linux distribution without reinstalling.

Featured Image Credit - Pixabay

You May Also Like

12 comments

warsea August 5, 2017 - 7:36 am

I found that on my Fedora installation the basesystem package was updated between Fedora 25 and 26 so that might not be a reliable way to determine the original installation time.

Reply
Alan August 3, 2018 - 6:19 pm

There are much better ways. The simplest for most installations is to check where / is mounted and then do

dumpe2fs /dev/whatever |grep created

That will give you the date the filesystem itself was created

Reply
Mike August 4, 2018 - 1:10 am

Wow, my current Manjaro install is almost 2 years old. More then I remembered. System still works great!

Reply
Aman August 5, 2018 - 5:52 pm

if i want to change instalation time 5 years back then how will i do?

Reply
Neto August 3, 2019 - 9:50 pm

Is it possible tô change The date?

Reply
Tom September 17, 2019 - 12:27 pm

not reliable, it shows all the same date in rpm on may Azure VMs… probably Azure installes all from the same image

Reply
Manfred May 20, 2020 - 2:51 pm

On Ubuntu Systems you could use the date of “/var/log/installer/syslog”

Reply
Hariharasudhan July 10, 2020 - 2:21 pm

Yes Super

Reply
bren September 20, 2020 - 6:34 am

Nice, i was trying to remember when I installed arch. Now I remember: in 2016 i installed the system on a 2GB thumb drive so i could play minecraft on a windows PC with crappy drivers ;P once i realized how cool it was I switched from debian to arch. I didn’t think to check the date on the filesystem X)

Reply
UweS. March 16, 2024 - 11:46 am

on Fedora the option with rpm -qi doesn’t work properly.

I’ve installed my OS today and the install date shows July 2023, so almost 8 months ago.
For me only the stats command showed the proper date

Reply
Nico June 14, 2026 - 3:16 pm

Hi,

Searching for the root filesystem creation date isn’t reliable because you can reuse the same partition for a new installation or an upgrade (Example: i’m currently running Linux Mint 22.3 and the “birth date” is december 18, 2022 which is the day i did a fresh install of LM 20.3)

Reply
sk June 15, 2026 - 12:40 pm

You’re right. If you always do a clean install with “reformatting of the root partition”, then the filesystem creation date will be the installation date. In your case, it is different. This is why you have to try multiple methods. We will update this guide with a clear warning soon. Thanks for the comment.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

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

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More