CentOS and Red Hat are two popular Linux distributions that are widely used for servers and workstations. In some cases, you may need to check the version of CentOS or Red Hat installed on your system, for example, to determine whether it is compatible with a particular software package. In this guide, we will show you how to check the version of CentOS or Red Hat installed on your system.
Step 1: Open the Terminal
The first step is to open the terminal on your CentOS or Red Hat system. You can do this by pressing Ctrl + Alt + T on your keyboard or by searching for “Terminal” in the Applications menu.
Step 2: Run the Command
Once the terminal is open, run the following command:
cat /etc/*release*
This command will display information about your CentOS or Red Hat version, including the version number, release name, and other details.
Step 3: Check the Output
The output of the command will look similar to the following:
CentOS Linux release 7.9.2009 (Core) Derived from Red Hat Enterprise Linux 7.9 (Source) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CentOS Linux release 7.9.2009 (Core) Derived from Red Hat Enterprise Linux 7.9 (Source)
In this example, the version of CentOS is 7.9.2009.
Commands Mentioned:
- cat /etc/*release* – Display information about CentOS or Red Hat version
Conclusion
In this guide, we have shown you how to check the version of CentOS or Red Hat installed on your system. By running the command cat /etc/*release* in the terminal, you can quickly and easily obtain information about your CentOS or Red Hat version. We hope this guide has been helpful to you. If you have any comments or suggestions for improvements, please feel free to share them below.
1 Comment
enter command
uname -r