本文介绍: 如果是想查看你的Linux系统是Ubuntu还是CentOS,可以使用lsb_releasea命令,lsb_releasea命令可以列出你的Linux系统是哪个Linux发行版,它还可以列出具体是第几个版本。radhatcentos存在: /etc/redhatrelease 这个文件命令 cat /etc/redhatreleaseubuntu存在 : /etc/lsbrelease 这个文件 【命令 cat etc/lsbrelease

前置小知识

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

查看linuxcentos还是ubuntu方法

以下总结了4种区分centosubuntu系统方法

1、lsb_releasea

如果是想查看你的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、aptget && yum

yum的就是Centosyumhelp

aptget的就是Ubuntu 【aptgethelp

4、cat /etc/issue

有Ubuntu字样为ubuntu,没有则是centos

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注