If you are new on Linux, you sometimes need to get assistance from the internet for your everyday tasks. While searching for the specific issue online, you can get the solution in the quickest possible way, if you are specific in describing your problem. When you try to describe your problem, you undoubtedly have to enter the name of the distribution that you are using, and depending upon the actual problem that you are facing, you might need to be more specific, and you might have to enter that version of the Linux distribution that you are using.
As a Linux Kernel can also get updated in the newer versions of a Linux distribution that you might be using, depending upon the minor updates, some things might get changed. In such a situation, entering the complete version can be useful for the online community to help you troubleshoot your problem. If you are using CentOS, which is a derivative of highly popular Red Hat Linux, I will talk about how you can check the version number, so that we can get a solution online, or make sure that you are using the latest version of CentOS. There can be a number of reasons, you might need to know the version of CentOS that you are using.
So today I will talk about, how to check the CentOS version in the Linux command line. Without any further delay, let’s get started with the different ways you can do that.
Open a Linux terminal, and type in the following command before hitting the enter key.
Knowing the major version of CentOS or Ubuntu
cat /etc/os-release
As you can see in the screenshot below, this will ensure that you are actually using a Linux distribution, and it will also display the major version of CentOS that you are using. This can be useful in certain situations, but the information is not specific.
Knowing the complete version of CentOS
cat /etc/centos-release
Or
cat /etc/redhat-release
For Ubuntu the same command used earlier:
cat /etc/os-release
You can either use any of the following commands to see the complete version of the CentOS that you are using. The breakup of the version of the CentOS version that you are using is shown in the screenshot below.
Checking the CentOS and the Linux kernel version
Note: You can use the commands on Ubuntu as well.
hostnamectl
Sometimes it becomes necessary to check the complete version of CentOS that you are using, along with the Linux kernel version. Besides that, you can also find information about your machine ID, boot ID, System architecture, to check whether the CentOS version is 32 or 64 bit, and a number of other small pieces of information.
Checking only the kernel version
uname -r
Though, not important every single time, but sometimes you might need to see just the Linux kernel version, and that’s when the following command can be useful.
So, those were the ways, you can see the CentOS version that you are using, without installing any third-party apps or programs. If you are working in an organization, and the system administrator suddenly asks you about the Linux version or the CentOS version you are using, you can use any of the following commands to check the CentOS or the kernel version, and instantly tell that to the system administrator.
So that was all about, how you can see the version of CentOS that you are using. Do you have any questions? Feel free to comment on the same below.
Related Posts
Download Visual studio code portable for Windows 11/10 or Linux
15 Best Linux Based OS for Raspberry Pi
How to create a Mysql Database on Amazon LightSail
Rufus for linux? Not available, Use these best alternatives
How to install Anaconda on WSL Windows 10/11 using Ubuntu Linux App
10 Top Most Beautiful Linux Distros or Operating systems