{"id":30209,"date":"2021-01-18T03:34:36","date_gmt":"2021-01-17T19:34:36","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=30209"},"modified":"2022-09-07T20:03:25","modified_gmt":"2022-09-07T12:03:25","slug":"linux-os-centos-version","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/linux-os-centos-version","title":{"rendered":"Linux OS: CentOS Version"},"content":{"rendered":"\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\tThe latest CentOS<\/a> version is\u00a0CentOS7 (version\u00a0<\/strong>7.7.1511)<\/strong><\/p> However, here are the others CentOS version under support: CentOS 6 (version 6.6.8)\u00a0\u00a0End Of Life (EOL) CentOS; CentOS 5 \u2014 version 5.5.11\u00a0 \u2013> 31st March 2017; CentOS 4 \u2014 version 4.4.9\u00a0\u00a0\u00a0 \u2013>\u00a0 29th February 2012<\/p> For more information, kindly visit our Linux VPS<\/a> page or contact<\/a> our support team.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Before starting to learn about how to check CentOS version, you should know that CentOS version consists of three parts, which are:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t There are CentOS release and version details in the CentOS specific file.<\/p> Centos Release Version<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t This file also contains the same information as the centos-release file.<\/p> This file contains the Linux OS information. So, you can get the major version number from this file.<\/p> CentOS is built on top of RedHat Linux distribution. Besides, this file also contains the same information as the centos-release file.<\/p> This command doesn\u2019t come pre-installed with the CentOS server. However, you can install it using the following command.<\/p> Then, check the CentOS version using the following command.<\/p> Besides using the command above, we can query the rpm package manager to get the CentOS version information.<\/p> Here is a simple rpm macro evaluation to get the CentOS major version.<\/p> Next, the hostnamectl command can be used to get the system information. Also, it reveals the Operating System version.<\/p>8 Ways to Check CentOS Version<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
1. \/etc\/centos-release file<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># cat \/etc\/centos-release<\/code><\/div>CentOS Linux release 8.1.1911 (Core) <\/code><\/div>[root@centos ~]<\/code># <\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t2. \/etc\/system-release file<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># cat \/etc\/system-release<\/code><\/div>CentOS Linux release 8.1.1911 (Core) <\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t3. \/etc\/os-release file<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># cat \/etc\/os-release<\/code><\/div>NAME=<\/code>\"CentOS Linux\"<\/code><\/div>VERSION=<\/code>\"8 (Core)\"<\/code><\/div>ID=<\/code>\"centos\"<\/code><\/div>ID_LIKE=<\/code>\"rhel fedora\"<\/code><\/div>VERSION_ID=<\/code>\"8\"<\/code><\/div>PLATFORM_ID=<\/code>\"platform:el8\"<\/code><\/div>PRETTY_NAME=<\/code>\"CentOS Linux 8 (Core)\"<\/code><\/div>ANSI_COLOR=<\/code>\"0;31\"<\/code><\/div>CPE_NAME=<\/code>\"cpe:\/o:centos:centos:8\"<\/code><\/div>HOME_URL=<\/code>\"https:\/\/www.centos.org\/\"<\/code><\/div>BUG_REPORT_URL=<\/code>\"https:\/\/bugs.centos.org\/\"<\/code><\/div>CENTOS_MANTISBT_PROJECT=<\/code>\"CentOS-8\"<\/code><\/div>CENTOS_MANTISBT_PROJECT_VERSION=<\/code>\"8\"<\/code><\/div>REDHAT_SUPPORT_PRODUCT=<\/code>\"centos\"<\/code><\/div>REDHAT_SUPPORT_PRODUCT_VERSION=<\/code>\"8\"<\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t4. \/etc\/redhat-release file<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># cat \/etc\/redhat-release<\/code><\/div>CentOS Linux release 8.1.1911 (Core) <\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t5. lsb_release command<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># yum install redhat-lsb<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>[root@centos ~]<\/code>#\u00a0 lsb_release -d<\/code><\/div>Description:\u00a0\u00a0\u00a0 CentOS Linux release 8.1.1911 (Core) <\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t6. rpm query<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># rpm -q centos-release<\/code><\/div>centos-release-8.1-1.1911.0.8.el8.x86_64<\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t7. rpm macro<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># rpm -E %{rhel}<\/code><\/div>8<\/code><\/div>[root@centos ~]<\/code>#<\/code><\/div><\/div><\/td><\/tr><\/tbody><\/table><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t8. hostnamectl command<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
[root@centos ~]<\/code># hostnamectl<\/code><\/div>