[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedJuly 3, 2023

How to Check your CentOS Version.

How To Check Your CentOS Version.

In this tutorial, we’ll show several different commands on how to check what version of CentOS is installed on your system.

 

Check CentOS version from the Command Line.

The lsb_release command displays Linux Standard Base (LSB) information about your Linux distribution.

lsb_release -a

Your CentOS version will be shown on the Description line.

Alternative methods to check CentOS version

Check CentOS version using the rpm command.

You can use the rpm tool to display information about the centos-release package, which includes the CentOS version in its name:

rpm --query centos-release
Output:
centos-release-7-9.2009.1.el7.centos.x86_64

 

Check CentOS version using the /etc/centos-release file

To find your CentOS version enter the following command:

cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)

 

Check your CentOS version using the /etc/os-release file

The /etc/os-release file is present on all systems running systemd and contains operating system identification data.

This method will only work if you have CentOS 7:

cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

 

Check your CentOS version using the hostnamectl command

hostnamectl is a command that allows you to set the system hostname , but you can also use it to find your CentOS branch.

This method will work only if you have CentOS 7:

hostnamectl
Static hostname: liviu.test
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 114054dc5a87478f99adbbed6027eea0
           Boot ID: f1abc254dae0418498e32057c515a92e
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-1160.76.1.el7.x86_64
      Architecture: x86-64

 

Conclusion

In this guide, we have shown you how to find the version of CentOS installed on your system.

Keep reading
How to use Gunzip Command.
March 15, 2023

How to use Gunzip Command.

How To Use Gunzip Command. Gunzip is a command-line tool for decompressing Gzip files. Gzip is one of the most popular compression algorithms that reduce the size of a file and keep the original file mode, ownership, and timestamp. By convention, files compressed with Gzip are given either the .gz…

Read article
How to use Chmod Command.
March 15, 2023

How to use Chmod Command.

How To Use Chmod Command. This tutorial covers how to use the chmod command to change the access permissions of files and directories. In Linux, access to the files is managed through the file permissions, attributes, and ownership. This ensures that only authorized users and processes can access…

Read article
How to use whereis command.
March 15, 2023

How to use whereis command.

How To Use Whereis Command. In this article, we will show you how to use the Linux whereis command. whereis is a command-line utility that allows you to find the location of the binary, source, and manual page files for a given command. How to Use the whereis Command The syntax for the whereis…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00