how to know the OS version of your distro ? CentOS / RHEL.

Posted by

Depending on your family distro or the release version (6.7…7.1 etc) you need to use and look for specific information to know the which exactly is the version, here are some examples to know the exact version of the distribution you are using. CentOS / RedHat

Two different commands that show us the same results.

Let’s check both ways.

1. Looking under /etc folder…

cat /etc/centos-release

[root@securitytweak opt]# cat /etc/centos-release

CentOS release 6.6 (Final)

Where you are going to check the file “centos-release” located in /etc folder. If you are looking for RHEL distro, do the following,

1. Go to /etc folder and do a “cat command” of the following file,

[root@securitytweak etc]# cat redhat-release

Red Hat Enterprise Linux Server release 7.4 (Maipo)

2. Running a specific command to show more specific information…

lsb_release -a

[root@securitytweak opt]# lsb_release -a

LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Distributor ID: CentOS

Description: CentOS release 6.6 (Final)

Release: 6.6

Codename: Final

There are two ways to get the same information about the version of your OS distro. Probably on RHEL, the second option does not work, so, check it with the first method.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s