How to tell if Linux is CentOS

angryTom
Release: 2020-03-14 13:33:34
Original
7094 people have browsed it

How to tell if Linux is CentOS

How to check if Linux is CentOS

Method 1: Check whether the redhat-release file exists

cat /etc/redhat-release
Copy after login

If the prompt file does not exist, it is not CentOS, if it exists, it is CentOS.

Note: Cat /etc/debian_version can be used to determine Debian/Ubuntu.

Method 2: Determine based on the package management tool

Enter yum. If there is output, it means CentOS. If it prompts that the command does not exist, it does not.

Note: Determine whether Debian/Ubuntu can use apt.

Recommended learning: CentOS usage tutorial

The above is the detailed content of How to tell if Linux is CentOS. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!