查看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中文网其它相关文章!
![php中文网最新课程二维码](/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
- 上一篇:linux有哪些系统
- 下一篇:linux虚拟机属于什么虚拟化
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论