方法:1、利用“cat /etc/issue”命令顯示發(fā)行版本信息;2、利用“l(fā)sb_release -a”命令顯示LSB和特定版本信息;3、利用“cat /etc/redhat-release”命令顯示Redhat Linux版本信息。
本文操作環(huán)境:centos 6.5系統(tǒng)、Dell G3電腦。
linux怎么查看是不是centos版本
1、一行很簡單的命令,就可以讓立刻知道,是centos還是ubuntu,還是debian。
[root@test ~]#cat /etc/issue CentOS release 6.5 (Final) Kernel r on an m BashCopy
2、登錄到服務器執(zhí)行 lsb_release -a 即可列出所有版本信息
LSB是Linux Standard Base的縮寫,lsb_release命令用來顯示LSB和特定版本的相關(guān)信息。
如下:
[root@test ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final BashCopy
注: 這個命令適用于所有的linux,包括Redhat、SuSE、Debian等發(fā)行版。
3、登錄到linux執(zhí)行 cat /etc/redhat-release
[root@test ~]# cat /etc/redhat-release CentOS release 6.5 (Final) BashCopy
注:這種方式下可以直接看到具體的版本號,比如 AS4 Update 1。 只對 Redhat Linux有效!
推薦教程:《centos教程》