How to find out the version of CENTOS

Anonim

How to find out the version of CENTOS

The developers of the CENTOS operating system at the moment are maintained in working condition three platform branches - 5, 6 and 7. Each of these branches has its own versions that are available for download on the official website. Sometimes you need to find out what kind of assembly it will use now. If you cannot remember such information yourself, built-in and additional OS utilities come to the rescue, and all actions are performed through the classical console.

Determine the version of CentOS.

In the CentOS version, several digits are specified immediately, each of which has its own value, for example, 7.6.1810. Here is 7 - the main version, 6 is secondary, and 1810 - the date code of the secondary version. Thanks to these values, the user can easily know the necessary information and apply them in the desired sphere. There is a fairly large number of teams to determine the assembly, we advise you to pay attention to only some of them. As part of today's article, we will talk about such useful utilities.

Method 1: LSB_RELEASE command

Standardization of the Internal CENTOS system is carried out thanks to the Linux Standard Base (LSB) standard. The LSB_Release command that allows you to find out the information about the standard base, supported by all versions of the OS under consideration and can be used to display the currently assembly of the platform. For this:

  1. Open the "Terminal" through the main or context menu, which is caused by pressing the PCM on the free area of ​​the desktop.
  2. Transition to CENTOS terminal for further definition of the system version

  3. Enter LSB_RELEESE -A, and then press the ENTER key.
  4. Use the LSB command to determine the current version of the CENTOS operating system

  5. If instead of the displayed version you received a notification that the command is not found, you will need to add libraries to the system.
  6. Notification of the absence of the LSB command in the CENTOS operating system

  7. Therefore, you will have to register Sudo Yum Install Redhat-LSB-Core.
  8. Install LSB components in CENTOS operating system

  9. Confirm the authenticity of the superuser account by entering the password from it.
  10. Enter a password to install LSB components in the CentOS operating system

  11. Take the download of new components by selecting the Y version.
  12. Confirm the installation of LSB components in the CentOS operating system

  13. After successful installation, re-enter LSB_Release -a, after which you will see several rows with information, among which will be both "Release".
  14. Displaying system information via LSB command in CentOS

If for any reason you do not fit this command or in connection with its absence in the system it is impossible to load the necessary components from the Internet, we advise you to resort to other options for displaying the CENTOS version using the built-in commands.

Method 2: RPM Tool

Experienced users probably know that RPM (Red Hat Package Manager) is a package management tool in distributions based on the Red Hat engine. Such platforms applies to CentOS. The fact is that the RPM utility has one special argument that allows you to display a new string with data about the current version of the system. To do this, you need to run the console and insert the RPM --Query CentOS-Release row.

Using the RPM command to display the CENTOS version version

After activating the command, a new line will appear with the information you are interested in. Not only the assembly version will be displayed here, but also its architecture, for example, CENTOS-RELEASE-7-6.1810.2.EL7.Centos.x86_64.

Displaying a CENTOS system via RPM command

Method 3: Cat Team

Standard for all distributions based on the Linux kernel, the CAT command is designed to view the contents of files of any formats, including configuration. You already have an article on our site dedicated to the detailed analysis of this utility, the link to which you will find below.

READ ALSO: Sample CAT command in Linux

Today we want to stay only on watching two files, and to familiarize yourself with the first to register CAT / ETC / CENTOS-Release.

View the contents of the file with the CENTOS system via the CAT command

By activating the command, in the next line you will receive the desired data.

Introduction to the version of the system through the CAT command in Centos

However, not all users suggests that in the above file contains so little information. Sometimes it may be necessary to define an identifier or link to the official website version. In this case, we advise you to view the contents of the / etc / os-release file through the same Cat command.

Analysis of the content of the second file d

Method 4: HostNamectL command

HostNamectl is a standard CENTOS command that allows you to find out the name of the host name, virtualization parameters, version of Kernel and the system architecture. In addition, it can be involved and, if necessary, determine the current assembly of the platform. Then in the console, it is enough to enter HostNamectl and click on ENTER.

Team to determine the host in the CENTOS operating system

Among all the lines, pay attention to the "Operating System": after a colon and the version of the OS will be indicated. As you can see, only the branch is displayed there. It is because this method will come far from all users, we put it last.

Information about the version of the CENTOS system through the host definition command

On this, our article comes to an end. You can only get acquainted with each given method and choose the most optimal situation in the current situation or seemed the most simple.

Read more