Introduction – Red Hat Enterprise Linux operating system created for enterprise customers. It is extremely popular among business users and sysadmin due to long-term support, stability and high-quality open source software. This page shows how to find out RHEL version from the command line.
How do I determine RHEL version?
To display the Red Hat Enterprise Linux version use any one of the following command/methods:
- To determine RHEL version, type: cat /etc/redhat-release
- Execute command to find RHEL version: more /etc/issue
- Show RHEL version using command line, rune: less /etc/os-release
- RHEL 7.x or above user can use the hostnamectl command to get RHEL version
Let us see all commands in details.
How to check RHEL / Redhat version
Type the following cat command:
Red Hat Enterprise Linux Server release 7.5 (Maipo)
To display the RHEL kernel version, type:
How to confirm RedHat Enterprise Linux version using hostnamectl
Simply run the following hostnamectl command:
Static hostname: nixcraft-rhel8 Icon name: computer-vm Chassis: vm Machine ID: 1a790a3f946c4936a2cb8dba207d19aa Boot ID: 58ebfde49964425ea754814b4ac54432 Virtualization: kvm Operating System: Red Hat Enterprise Linux 8.0 Beta (Ootpa) CPE OS Name: cpe:/o:redhat:enterprise_linux:8.0:beta Kernel: Linux 4.18.0-32.el8.x86_64 Architecture: x86-64
Other commands to find out RHEL version
One can use the rpm command:
rpm --query redhat-release-server
Another option is to run lsb_release command. However, you need to install a package named redhat-lsb-core using the yum command as follows
sudo yum install redhat-lsb-core
## now get RHEL version ##
LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: RedHatEnterprise Description: Red Hat Enterprise Linux release 8.0 Beta (Ootpa) Release: 8.0 Codename: Ootpa
A sample session from my RHEL 7 server
This page showed you various RHEL command to find out your Redhat Enterprise Linux (RHEL) version.