You may need version of your operating system when you need to solve some problem with Windows or when you leave a question on the forum about how to configure anything.
In this article, we’ll look at how to know the version of CentOS 7, to see the level of updates, as well as to know the kernel version, which is now used. The instructions are written for CentOS 7, but it will be suitable for earlier versions of the distribution files containing the basic information is the same in many versions.
How to know the version of CentOS 7
Basic information about the distribution and its version are stored in these four files:
In my case it is CentOS 7.6.1810:
Have CentOS 7 currently used rolling-upgrade system, this means that when a new release you do not need to reinstall the system, but rather only update it regular utility yum. But it is only in the seventh version. It is therefore important not only that this is CentOS 7, but other numbers matter. In the rest of the files too, is this information:
In the file /etc/os-release is only stored the information that this is the seventh version of CentOS 7:
All these four files belong to the package centos-release. So you can recognize the version of the distribution, even seeing the version of this package:
The CentOS version and kernel version can be viewed using a utility hostnamectl:
Another way to see the version of CentOS is a utility lsb_release. It is in the package redhat-lsb and not installed by default. To install it run:
yum install redhat-lsb
You can then run the command:
To view the full information, use the-a option:
How to see kernel version in CentOS 7
As in other distros, in CentOS to view information about the core network, use the uname. To view all available information, use the-a option:
To view only the kernel, specify the-r option:
And to find out the date and time the kernel compilation, run:
In this small article we discussed how to see the version of CentOS 7 in a variety of ways. What other ways do you know to view the version of the distribution? Write in the comments!