2、cat /etc/redhat-release && cat /etc/lsb-release
radhat或centos存在: /etc/redhat-release 这个文件【 命令 cat /etc/redhat-release 】
ubuntu存在 : /etc/lsb-release 这个文件 【命令 cat etc/lsb-release 】
3、apt-get && yum
有yum的就是Centos【yum -help】
有apt-get的就是Ubuntu 【apt-get -help】
4、cat /etc/issue
有Ubuntu字样为ubuntu,没有则是centos
以上就是查看linux是centos还是ubuntu的方法的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
更多相关阅读请进入《Linux》频道 >>