How to Check CentOS Version

Though there is certainly reason to be sad about CentOS’ discontinuation, the good news is that the midstream version will receive long-term support up until at least June 2024. So, for any of you who would still like to continue using the RHEL-derived OS, you’re more than welcome to. In this guide, we’ll show you how to check the CentOS version running on your machine. I’ll be checking using CentOS 8 (8.4.2105).

Check CentOS Using RPM (Easiest)

The RPM Package Manager provides the quickest and easiest way to find out which version of CentOS is running.

  1. From the home screen, click ‘Activities’ in the top left-hand corner.

    CentOS Article Screen 1
    Click ‘activities’ to bring up the search box

  2. Then, type ‘terminal’ into the search box which appears. Now, click the terminal button.

    CentOS Article Screen 2
    Search for ‘terminal’

  3. In the terminal window, enter the following command:
rpm -q centos-linux-release

Then hit enter.

CentOS Article Screen 3
The rpm command should let you see exactly which version of CentOS is installed

As you can see, the exact version of CentOS (including the major release number, as well as the revision).

Check CentOS Version Using Your Release File

You might not know this, but there’s actually a text file included in your CentOS installation. It’s located in the ‘/etc/’ directory, and it’s very handy for checking your release version.

  1. From the home screen, click ‘Activities’ in the top left-hand corner.

    CentOS Article Screen 1
    Click ‘activities’ to bring up the search box

  2. Now, click the Terminal icon which appears on the left-hand sidebar.

    CentOS Article Screen 4
    This time, we’re using the Terminal icon (circled in red here)

  3. In the window which opens, enter the following command:
cat /etc/centos-release

Then hit enter.

CentOS Article Screen 5
The ‘cat’ command provides another easy way to view our current version of CentOS

There’s also a way to find out more details about your release, by using the following command instead:

cat /etc/os-release

And hit enter.

CentOS Article Screen 6
Using the ‘os-release’ file provides more information about our current installation

As you can see, this command doesn’t provide your exact release number, but it does provide other useful information such as the ‘Platform_ID’ and the ‘Pretty Name’.

Check the ‘Pretty Name’ Using the GUI

If you’re also content just to know which major release of CentOS you’re using, you can do this using the graphical interface. This method might also be useful if – for whatever reason – you can’t use the terminal.

  1. Again, click ‘activities’ in the top left-hand corner.

    CentOS Article Screen 1
    Click ‘activities’ to bring up the search

  2. Then, type ‘version’ into the search box which appears.

    CentOS Article Screen 7
    Typing ‘version’ should bring up the ‘About’ app

  3. You can now see the release of CentOS you’re currently running. Although less detailed, this method only requires using the GUI.
CentOS Article Screen 8
Find your CentOS version in the GUI

Bonus Tip: You can click the ‘View Updates’ button in the bottom right-hand area of the above screenshot to begin updating your current installation (if needed).

Leave a Comment