前置小知識(shí):
一般來(lái)說(shuō)著名的 Linux 系統(tǒng)基本上分兩大類(lèi):
RedHat 系列:Redhat、Centos、Fedora 等
Debian 系列:Debian、Ubuntu 等
查看linux是centos還是ubuntu的方法
以下總結(jié)了4種區(qū)分centos和ubuntu系統(tǒng)的方法。
1、lsb_release -a
如果是想查看你的Linux系統(tǒng)是Ubuntu還是CentOS,可以使用lsb_release -a命令,lsb_release -a命令可以列出你的Linux系統(tǒng)是哪個(gè)Linux發(fā)行版,它還可以列出具體是第幾個(gè)版本。(推薦:linux使用教程)
2、cat /etc/redhat-release && cat /etc/lsb-release
radhat或centos存在: /etc/redhat-release 這個(gè)文件【 命令 cat /etc/redhat-release 】
ubuntu存在 : /etc/lsb-release 這個(gè)文件 【命令 cat etc/lsb-release 】
3、apt-get && yum
有yum的就是Centos【yum -help】
有apt-get的就是Ubuntu 【apt-get -help】
4、cat /etc/issue文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-752377.html
有Ubuntu字樣為ubuntu,沒(méi)有則是centos文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-752377.html
到了這里,關(guān)于如何查看linux系統(tǒng)是Ubuntu還是Centos的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!