方式一

radhat或centos存在: /etc/redhat-release 这个文件

cat /etc/redhat-release

ubuntu存在 : /etc/lsb-release 这个文件

cat etc/lsb-release
方式二

看看安装指令,
有yum的就是Centos

yum -help

有apt-get的就是Ubuntu

apt-get -help
Logo

更多推荐