Linux serverNETWORK ADMINISTRATIONS

How to Check the CentOS Version in Linux

Disclaimer/Disclosure: Some of the content was synthetically produced using various Generative AI (artificial intelligence) tools; so, there may be inaccuracies or misleading information present in the video. Please consider this before relying on the content to make any decisions or take any actions etc. If you still have any concerns, please feel free to write them in a comment. Thank you.

Summary: Learn how to easily check the version of CentOS installed on your Linux system using command-line tools. Find out the exact CentOS release and kernel version with these straightforward steps.

If you’re working with a CentOS Linux system and need to quickly find out which version is installed, there are simple command-line methods to retrieve this information. Here’s how you can check the CentOS version and kernel version:

Checking CentOS Version

Using cat /etc/centos-release:
Open a terminal and enter the following command:

[[See Video to Reveal this Text or Code Snippet]]

This command will display a line specifying the CentOS version installed (e.g., CentOS Linux release 7.x).

Using rpm -q centos-release:
Another way to get the CentOS version is by querying the centos-release package using rpm:

[[See Video to Reveal this Text or Code Snippet]]

This command will show detailed information about the installed centos-release package, including the version.

Checking Kernel Version

To find out the kernel version of your CentOS system, you can use the following command:

[[See Video to Reveal this Text or Code Snippet]]

Running this command will output the kernel version currently running on your CentOS system (e.g., 3.10.0-123.el7.x86_64).

Additional Information

Understanding the Output: The version information obtained using these commands will typically include details like the CentOS release version (e.g., CentOS 7) and the specific kernel version.

System Updates: Keep in mind that these commands will reflect the version of CentOS at the time of the query. For the most accurate information, ensure your system is up to date with the latest packages and updates.

By using these straightforward commands, you can quickly determine the version of CentOS installed on your Linux system without needing to navigate through graphical interfaces or extensive configuration files.

source

centos 7