天天看點

Linux - 實戰 - 如何判斷系統是Centos還是Ubuntu

方式一

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