How to Check RHEL Version

check rhel version

If you are a Linux administrator, it is crucial to know how to check the Red Hat Enterprise Linux (RHEL) version installed on your system. Knowing the version number is essential to ensure compatibility with software packages and to apply security patches and updates.

In this article, we will explain how to check the RHEL version using different methods, including command-line tools and graphical user interfaces.

Checking RHEL Version using Command-Line Tools

There are several command-line tools that you can use to check the RHEL version installed on your system. Here are some of the most commonly used ones:

Method 1: /etc/redhat-release

The most straightforward way to check the RHEL version is to use the /etc/redhat-release file. This file contains the name and version number of the RHEL release.

To check the RHEL version using this method, open the terminal and type the following command:

cat /etc/redhat-release

The output should look something like this:

Red Hat Enterprise Linux Server release 7.9 (Maipo)

In this example, the RHEL version is 7.9.

Method 2: /etc/os-release

Another way to check the RHEL version is to use the /etc/os-release file. This file contains information about the operating system, including the version number.

To check the RHEL version using this method, open the terminal and type the following command:

cat /etc/os-release | grep PRETTY_NAME

The output should look something like this:

PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"

In this example, the RHEL version is 7.9.

Method 3: lsb_release

The lsb_release command-line tool is another way to check the RHEL version. This tool is not installed by default, so you may need to install it first.

To install lsb_release, open the terminal and type the following command:

sudo yum install -y redhat-lsb-core

Once installed, you can check the RHEL version by typing the following command:

lsb_release -a

The output should look something like this:

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 7.9 (Maipo)
Release:        7.9
Codename:       Maipo

In this example, the RHEL version is 7.9.

Checking RHEL Version using Graphical User Interfaces

If you prefer to use a graphical user interface (GUI), there are several ways to check the RHEL version.

Method 1: System Settings

One way to check the RHEL version using a GUI is to use the System Settings tool. This tool is available in the Activities menu.

To check the RHEL version using this method, follow these steps:

  1. Click on the Activities menu in the top left corner of the screen.
  2. Type “System Settings” in the search bar and click on the icon when it appears.
  3. Click on the “Details” icon in the System Settings window.
  4. The RHEL version should be displayed under “Overview.”

Method 2: About This Computer

Another way to check the RHEL version using a GUI is to use the “About This Computer” tool. This tool is available in the Activities menu.

To check the RHEL version using this method, follow these steps:

  1. Click on the Activities menu in the top left corner of the screen.
  2. Type “About This Computer” in the search bar and click on the icon when it appears.
  3. The RHEL version should be displayed under “Operating System.”

Conclusion

In this article, we have explained how to check the RHEL version using different methods, including command-line tools and graphical user interfaces. By knowing the RHEL version, you can ensure compatibility with software packages and apply security patches and updates.

Whether you prefer using the command line or a GUI, there are several ways to check the RHEL version on your system. Choose the method that works best for you and ensure that your system is up-to-date and secure.