Home>Article>Operation and Maintenance> How to check whether centos version is 6 or 7
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.
The operating environment of this article: centos 6.4 system, Dell G3 computer.
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
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
Method 3.
You can also view the release version number by viewing the /etc/issue file
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!