Home>Article>Operation and Maintenance> 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!