What Version Of Red Hat Linux (RHEL) Am I Running?

by on January 25, 2013 · 0 comments· LAST UPDATED January 25, 2014

in , ,

I am a new Red Hat Enterprise Linux user. How do I find out what version of RHEL am I using from the shell prompt?

You can use any one of the following command to find our your Red Hat Enterprise Linux server version:

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
RequirementsNone
Estimated completion time1m
a) lsb_release command

b) /etc/redhat-release file

c) /etc/issue file

Method #1: Find RHEL version using /etc/redhat-release file

Type the following cat command to display the contents of a file called /etc/redhat-release:
$ cat /etc/redhat-release
Sample outputs:

Red Hat Enterprise Linux Server release 6.5 (Santiago)

In this example, I am using RHEL version 6.5.

Method #2: Determine what version of Red Hat Enterprise Linux is running using lsb_release command

You need to install a package called redhat-lsb-core using yum command:
$ sudo yum install redhat-lsb-core
Sample outputs:

Loaded plugins: product-id, protectbase, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6 will be installed
epel/filelists_db                                        | 8.1 MB     00:02
ksplice-uptrack/filelists                                | 2.2 kB     00:00
rhel-x86_64-server-6/filelists                           |  28 MB     00:04
rhel-x86_64-server-6-debuginfo/filelists                 |  38 MB     00:05
rhel-x86_64-server-optional-6/filelists                  |  10 MB     00:01
rhel-x86_64-server-optional-6-debuginfo/filelists        |  34 MB     00:05
rhel-x86_64-server-supplementary-6/filelists             | 1.5 MB     00:00
rhel-x86_64-server-supplementary-6-debuginfo/filelists   |  863 B     00:00
--> Processing Dependency: perl-Test-Simple for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Processing Dependency: perl-CGI for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Processing Dependency: /usr/bin/pax for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Processing Dependency: /usr/bin/patch for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Processing Dependency: /bin/gettext for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Processing Dependency: /usr/bin/msgfmt for package: redhat-lsb-core-4.0-7.el6.x86_64
--> Running transaction check
---> Package gettext.x86_64 0:0.17-16.el6 will be installed
--> Processing Dependency: cvs for package: gettext-0.17-16.el6.x86_64
---> Package patch.x86_64 0:2.6-6.el6 will be installed
---> Package pax.x86_64 0:3.4-10.1.el6 will be installed
---> Package perl-CGI.x86_64 0:3.51-136.el6 will be installed
---> Package perl-Test-Simple.x86_64 0:0.92-136.el6 will be installed
--> Running transaction check
---> Package cvs.x86_64 0:1.11.23-16.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package             Arch      Version            Repository               Size
================================================================================
Installing:
 redhat-lsb-core     x86_64    4.0-7.el6          rhel-x86_64-server-6     25 k
Installing for dependencies:
 cvs                 x86_64    1.11.23-16.el6     rhel-x86_64-server-6    712 k
 gettext             x86_64    0.17-16.el6        rhel-x86_64-server-6    1.8 M
 patch               x86_64    2.6-6.el6          rhel-x86_64-server-6     91 k
 pax                 x86_64    3.4-10.1.el6       rhel-x86_64-server-6     69 k
 perl-CGI            x86_64    3.51-136.el6       rhel-x86_64-server-6    209 k
 perl-Test-Simple    x86_64    0.92-136.el6       rhel-x86_64-server-6    112 k
 
Transaction Summary
================================================================================
Install       7 Package(s)
 
Total download size: 3.0 M
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
(1/7): cvs-1.11.23-16.el6.x86_64.rpm                     | 712 kB     00:00
(2/7): gettext-0.17-16.el6.x86_64.rpm                    | 1.8 MB     00:00
(3/7): patch-2.6-6.el6.x86_64.rpm                        |  91 kB     00:00
(4/7): pax-3.4-10.1.el6.x86_64.rpm                       |  69 kB     00:00
(5/7): perl-CGI-3.51-136.el6.x86_64.rpm                  | 209 kB     00:00
(6/7): perl-Test-Simple-0.92-136.el6.x86_64.rpm          | 112 kB     00:00
(7/7): redhat-lsb-core-4.0-7.el6.x86_64.rpm              |  25 kB     00:00
--------------------------------------------------------------------------------
Total                                           3.1 MB/s | 3.0 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : cvs-1.11.23-16.el6.x86_64                                    1/7
  Installing : gettext-0.17-16.el6.x86_64                                   2/7
  Installing : perl-Test-Simple-0.92-136.el6.x86_64                         3/7
  Installing : pax-3.4-10.1.el6.x86_64                                      4/7
  Installing : perl-CGI-3.51-136.el6.x86_64                                 5/7
  Installing : patch-2.6-6.el6.x86_64                                       6/7
  Installing : redhat-lsb-core-4.0-7.el6.x86_64                             7/7
  Verifying  : patch-2.6-6.el6.x86_64                                       1/7
  Verifying  : perl-CGI-3.51-136.el6.x86_64                                 2/7
  Verifying  : redhat-lsb-core-4.0-7.el6.x86_64                             3/7
  Verifying  : pax-3.4-10.1.el6.x86_64                                      4/7
  Verifying  : gettext-0.17-16.el6.x86_64                                   5/7
  Verifying  : perl-Test-Simple-0.92-136.el6.x86_64                         6/7
  Verifying  : cvs-1.11.23-16.el6.x86_64                                    7/7
 
Installed:
  redhat-lsb-core.x86_64 0:4.0-7.el6
 
Dependency Installed:
  cvs.x86_64 0:1.11.23-16.el6        gettext.x86_64 0:0.17-16.el6
  patch.x86_64 0:2.6-6.el6           pax.x86_64 0:3.4-10.1.el6
  perl-CGI.x86_64 0:3.51-136.el6     perl-Test-Simple.x86_64 0:0.92-136.el6
 
Complete!

Now type the following command:
$ lsb_release -a
Sample outputs:

Fig.01: Finding out RHEL version

Fig.01: Finding out RHEL version

Method #3: Find RHEL release and version using /etc/issue file

Type the following cat command:
$ cat /etc/issue
Sample outputs:

Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m

Related media

This tutorials is also available in a quick video format:



Video 01: What Version Of Linux Am I Running?

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , ,

Previous Faq:

Next Faq: