How to Check CentOS Version
Linux

How to Check Centos Version

The purpose of this post Checking CentOS version in determining the OS and kernel versions of your Community ENTerprise Operating System (CentOS) or Red Hat Enterprise Linux operating system (RHEL) system

Open-source operating system CentOS is based on Red Hat Enterprise Linux source code and the Linux kernel. It is stable software with high levels of security and a wide variety of panel choices. To check latest Centos Stream

Do you know what version of CentOS or RHEL your server is running? Why even is this significant? You should keep this information in view for a number of reasons, including rapid system information gathering required with security and bug fixes, and configuring the appropriate software repositories for a particular version.

1. Centos Version

For extra assurance, I suggest you use the /etc/os-release file to determine if you’re actually on a CentOS distribution of Linux. By using the cat command, you can view these files directly.

cat /etc/os-release
[root@cs ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

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

2. Using Hostnamectl Command

Generally, if you are running a recent Linux version. Use hostnamectl command to confirm Linux release and get Machine ID and Boot ID for your machine.

hostnamectl

3. Using lsb_release Command

Linux distribution information can be obtained with the lsb_release command Check Ubuntu Version.

lsb_release -a
[root@C7 yum.repos.d]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.9.2009 (Core)
Release: 7.9.2009
Codename: Core

 

NOTE: In RedHat/CentOS version need to install the package by using yum install redhat-lsb-core

4. Confirm CentOS version with rpm

RPM package management to look for information from the unique package centos-release. Literally the entire package name will contain the exact CentOS release version:

rpm -qa centos-release
[root@C7 yum.repos.d]# rpm -qa centos-release
centos-release-7-9.2009.0.el7.centos.x86_64

Version numbers for CentOS are divided into three major categories:

  1. ‘7’ represents CentOS major branch.
  2. “9” indicates the latest minor release.
  3. The remaining portion, “2009,” is further split into two parts: “20” indicates the year (2009) that the CentOS operating system was introduced, and “09” denotes the month.

5. Check the Running Kernel version

By running the uname command, you can find out what CentOS kernel version and architecture you are using. To learn more about uname, type “man uname”.

uname -a

 

conclusion:

If you have a question about Checking CentOS version topic, you can ask it here. Feel free to add any other method you believe we should cover in the comment section below.

In next article discussed about LVM concepts and disk expansion in Linux.

Next PostHow to Extend a Partition in Linux Previous PostLinux Logical Volume Manager (LVM) Procedure

Leave a Reply

Your email address will not be published. Required fields are marked *