当前位置: 首页 > 新闻动态 > 技术教程

查看linux是centos还是ubuntu的方法

作者:angryTom 浏览: 发布日期:2019-11-18
[导读]:查看linux是centos还是ubuntu的方法有:1、使用命令lsb_release -a;2、查看文件cat /etc/redhat-release;3、查看文件cat /etc/lsb-release;4、通过包管理器yum,等等。

查看linux是centos还是ubuntu的方法

以下总结了4种区分centos和ubuntu系统的方法。

1、lsb_release -a

如果是想查看你的Linux系统是Ubuntu还是CentOS,可以使用lsb_release -a命令,lsb_release -a命令可以列出你的Linux系统是哪个Linux发行版,它还可以列出具体是第几个版本。(推荐:linux使用教程

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

免责声明:转载请注明出处:http://sczxchw.cn/news/226641.html

扫一扫高效沟通

多一份参考总有益处

免费领取网站策划SEO优化策划方案

请填写下方表单,我们会尽快与您联系
感谢您的咨询,我们会尽快给您回复!