Home>Article>Operation and Maintenance> How to tell if Linux is CentOS

How to tell if Linux is CentOS

angryTom
angryTom Original
2020-03-14 13:33:34 7173browse

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

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!

Statement:
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
Previous article:How to exit CentOS Next article:How to exit CentOS