【Linux】查看linux是centos还是ubuntu的方法

编程知识 行业动态 更新时间:2024-06-13 00:20:39

查看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

以上就是查看linux是centos还是ubuntu的方法的详细内容,更多请关注php中文网其它相关文章!

更多推荐

【Linux】查看linux是centos还是ubuntu的方法

本文发布于:2023-03-30 07:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/9c0d3f9268d8e67026281f73ecf7cac7.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   linux   Linux   ubuntu   centos

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!