查看linux是ubuntu还是centos

方式一:
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】。

posted @ 2019-04-29 13:32  Peter.Jones  阅读(18037)  评论(0编辑  收藏  举报