查看linux是centos還是ubuntu的方法

查看linux是centos還是ubuntu的方法

查看linuxcentos還是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

以上就是查看

? 版權聲明
THE END
喜歡就支持一下吧
點贊11 分享