如何查看linux系统是Ubuntu还是Centos - 2、cat /etc/redhat-release &amp

📅 2026-11-30 👤 拼多多助力营销技巧 📂 拼多多助力 👁️ 141 次阅读

前置小知识:

一般来说著名的 Linux 系统基本上分两大类: RedHat 系列:Redhat、Centos、Fedora 等 Debian 系列:Debian、Ubuntu 等

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

参考链接 拼多多帮助力入口

标签: 拼多多助力网站平台 赚钱项目 拼多多助力网 首码项目 手赚APP
拼多多助力营销技巧