Walker News

Two Commands To Check RHEL Version or Release Number

You know that uname -a only prints the Linux kernel version as well as CPU architecture (e.g. 32/64bit), it doesn’t tell you the Linux distribution name and its release number.

For example, Red Hat Enterprise Linux (RHEL) is one of the many Linux distributions. There are many different RHEL releases and updates too. If you’re tasked to find out the RHEL version installed on the servers, there are at least 2 methods to find out the RHEL release and update number:

View the /etc/redhat-release file

This plain text file exists on most (if not all) RHEL machines, which is installed by a RPM package named redhat-release*. So, just cat the file:
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)

Execute lsb_release command

This binary is installed by a RPM package named redhat-lsb*.

For example, the output of a server running the first version of RHEL release 5 that has no update installed (a.k.a. RHEL5.0):
[root@localhost1 ~] /usr/bin/lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5 (Tikanga)
Release:        5
Codename:       Tikanga

Custom Search

2016  •  Privacy Policy