What Version of RHEL am I Using?
RHEL or Red Hat Enterprise Linux is one of the many operating systems provided by Red Hat. Red Hat is a popular Linux OS and has started functioning ever since the mid-1990s. Red Hat earned a good reputation due to being stable, regularly updated, and reliable.
If you are using RHEL and want to find its version, this article is for you. Now let’s check 7 useful methods to know what version of RHEL you are using.
Method 1: Track Your System with Hostnamectl
The hostnamectl command helps track your system’s appearance on a network. It also finds the operating system and its release version. So, this can be a quick way to check this information.
To use this command, open a terminal and type:
In the output result, you’ll see the OS, kernel, and the architecture details.
Method 2: Use RPM Command
Red Hat Package Manager, abbreviated to RPM, is a well known core package management utility included in Red Hat Enterprise Linux. You can identify the RHEL version you are using with this command.
Use RPM in the following manner.
$ rpm --query redhat-release
You can also identify CentOS’ (another OS offered by Red Hat) release version using the RPM command. To check, type:
$ rpm --query centos-release
As you enter the command suitable for your OS, the release version will appear on the screen.
Method 3: Check Red Hat Release File
Linux distributions based on Red Hat contain release files. You can find such files in the
/etc/redhat-release directory. There are various types of Red hat release files, such as
Check your Red Hat OS release version with the help of the below-given command.
$ cat /etc/redhat-release
To get more information, you can use the following commands.
$ cat /etc/system-release $ cat /etc/os-release #contains more information
Method 4: Check within Red Hat Issue File
To check your Red Hat version, check within the
/etc/issue file. To find the version, type:
$ cat /etc/issue
Method 5: Use lsb_release Command
LSB stands for Linux Standard Base. The
lsb_release command shows the Linux distribution information and some LSB. On RHEL, the
lsb_release is provided within the
redhat_lsb. You can simply install the
redhat_lsb package to use the command. To install, type:
$ sudo yum install redhat-lsb
After installing the package, check your RHEL version using:
$ lsb_release -d
If you are on CentOS, you can also identify its version with the same command given above.
Method 6: Check CPE File
CPE stands for Common Platform Enumeration. To check the Red Hat version using the CPE command, enter:
$ cat /etc/system-release-cpe
When this command is entered, the Linux system should return the version and the full name of your OS.
Method 7: Check Other Release Files
As you already have seen, your Linux system keeps a long list of release files within its /etc/ directory. You can display a list of release version file names by:
$ ls /etc/*release
You’ll notice that every record contains information about the Red Hat version. To view the file contents, use the cat command in the following way.
$ cat /etc/redhat-release
Cat or concatenate command shows the content of a file.
The Linux kernel is the central brain of your Linux OS. And the kernel can have updates irrespective of the OS. The OS version is the release version of the entire operating system package.
Hope this article has made it clear what version of RHEL you are on. For more details regarding RHEL, please visit Red Hat’s official website.