How to Find Out the RHEL Version

You need to run one of the commands

cat /proc/version

the answer contains the kernel version and gcc

Linux version 3.10.0-1160.el7.x86_64 (mockbuild@x86-vm-26.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Aug 18 14:50:17 EDT 2020

hostnamectl

will also show the Machine ID and Boot ID

Static hostname: localhost.localdomain Icon name: computer-vm Chassis: vm Machine ID: a8cc136671b14e319c029e2e9fd5320d Boot ID: 5c9762c381d74ce789486dd6f977254e Virtualization: vmware Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo) CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server Kernel: Linux 3.10.0-1160.el7.x86_64 Architecture: x86-64

lsb_release -a

LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: RHEL Description: RHEL Linux release 7.9.2009 (Core) Release: 7.9.2009 Codename: Core

Article author: Andrei Olegovich