How to check CentOS version

fwh

Administrator
Staff Member
Joined
Dec 8, 2012
Messages
773
Points
63
There are a few ways to check your VPS hosting is using what version of CentOS. With commands below you can choose one of them to find out which CentOS version is running on your system. However, depending on your system not all codes may be applicable.

Using rpm command to to query for centos-release package to reveal CentOS version:
Code:
rpm --query centos-release
Here's mine
Code:
[root@server /]# rpm --query centos-release
centos-release-6-8.el6.centos.12.3.x86_64
Use cat command to read their content in order to show CentOS version:

Code:
 cat /etc/centos-release
Code:
[root@server /]#  cat /etc/centos-release
CentOS release 6.8 (Final)
or

Code:
[root@server /]# cat /etc/redhat-release
CentOS release 6.8 (Final)
 

enomyn

Member
Registered
Joined
Sep 14, 2016
Messages
32
Points
0
can use "lsb_release -d" command too

Code:
[root@host ~]# lsb_release -d
Description:	CentOS release 6.8 (Final)
 

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
Maxoq
This command lsb_release -d didn't work on my CentOS VPS
I am using Centos 608 too.

It returned this

Code:
[root@maxoq~]# lsb_release -d
-bash: lsb_release: command not found
I am wondering how you ran that command. :think:
 

enomyn

Member
Registered
Joined
Sep 14, 2016
Messages
32
Points
0
enomyn
Run this before the command:

yum install redhat-lsb

you need to install the LSB module
 
Older Threads
Replies
3
Views
3,467
Replies
1
Views
2,188
Replies
3
Views
2,130
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top