How to check whether centos version is 6 or 7

WBOY
Release: 2022-02-09 11:53:15
Original
22491 people have browsed it

Checking method: 1. Use the "lsb_release -a" command to check; 2. Use the "Cat /etc/centos-release" command to check; 3. Use the "cat /etc/issue" command to check.

How to check whether centos version is 6 or 7

The operating environment of this article: centos 6.4 system, Dell G3 computer.

How to check whether centos version is 6 or 7

Method 1

For Linux systems, there are hundreds of distributions. How to check the version number of the release version

Take centos as an example. Enter lsb_release -a

This command applies to all linux, including Redhat, SuSE, Debian and other distributions

How to check whether centos version is 6 or 7

Method 2

If as shown above, there is no such command

You can check Cat /etc/xxx-release XX is the release name. For example, centos-release

How to check whether centos version is 6 or 7

Method 3.

You can also view the release version number by viewing the /etc/issue file

How to check whether centos version is 6 or 7

Recommended tutorial: "centos tutorial"

The above is the detailed content of How to check whether centos version is 6 or 7. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template