There are several ways to determine the version of Red Hat Enterprise Linux (RHEL) you are using:
- Using the
lsb_release
command:
lsb_release -a
The output will include a line indicating the distribution name and version, for example:
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.8 (Maipo)
- Using the
/etc/redhat-release
file:
cat /etc/redhat-release
The output will include a line indicating the version of RHEL, for example:
Red Hat Enterprise Linux Server release 7.8 (Maipo)
- Using the
/etc/os-release
file:
cat /etc/os-release
The output will include a line indicating the version of RHEL, for example:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
These methods should provide you with the version of RHEL you are using.