一。查看內(nèi)核版本命令: 1) [root@SOR_SYS ~]# cat /proc/version 2)[root@SOR_SYS ~]# uname -r 二。查看linux版本: 1) 登錄到服務(wù)器執(zhí)行 lsb_release -a ,即可列出所有版本信息,例如: [root@SOR_SYS ~]# lsb_release -a 注:這個(gè)命令適用于所有的linux,包括Redhat、SuSE、Debian等發(fā)行版。 2) 登錄到linux執(zhí)行cat /etc/issue,例如如下: [root@SOR_SYS ~]# cat /etc/issue [root@SOR_SYS ~]# 3) 登錄到linux執(zhí)行cat /etc/redhat-release ,例如如下: [root@SOR_SYS ~]# cat /etc/redhat-release 注:這種方式下可以直接看到具體的版本號(hào),比如 AS4 Update 1 4)登錄到linux執(zhí)行rpm -q redhat-release ,例如如下: [root@SOR_SYS ~]# rpm -q redhat-release 注:這種方式下可看到一個(gè)所謂的release號(hào),比如上邊的例子是5 這個(gè)release號(hào)和實(shí)際的版本之間存在一定的對(duì)應(yīng)關(guān)系,如下: redhat-release-3AS-1 -> Redhat Enterprise Linux AS 3 redhat-release-3AS-7.4 -> Redhat Enterprise Linux AS 3 Update 4 redhat-release-4AS-2 -> Redhat Enterprise Linux AS 4 redhat-release-4AS-2.4 -> Redhat Enterprise Linux AS 4 Update 1 redhat-release-4AS-3 -> Redhat Enterprise Linux AS 4 Update 2 redhat-release-4AS-4.1 -> Redhat Enterprise Linux AS 4 Update 3 redhat-release-4AS-5.5 -> Redhat Enterprise Linux AS 4 Update 4 另:第3)、4)兩種方法只對(duì)Redhat Linux有效 5) [root@SOR_SYS ~]# file /bin/bash 6) [root@SOR_SYS ~]# file /bin/cat |
|
來(lái)自: 優(yōu)聯(lián)云圖 > 《UNIX》