系統(tǒng) |
發(fā)行版本 |
— |
內(nèi)核版本、位數(shù) |
RedHat |
cat /etc/issue |
cat /etc/redhat-release |
lsb_release -a |
CentOS |
cat /etc/issue |
cat /etc/centos-release |
cat /proc/version |
Debian |
cat /etc/issue |
cat /etc/debian_version |
cat /proc/version |
Ubuntu |
cat /etc/issue |
cat /etc/lsb_release |
cat /proc/version |
Oracle |
cat /etc/issue |
cat /etc/oracle-release |
lsb_release -a |
RedHat
查看系統(tǒng)發(fā)行版本
[root@getlnx05 ~]# cat /etc/issue Red Hat Enterprise linux Server release 5.7 (Tikanga) Kernel r on an m
通過cat /etc/redhat-release也查到看到相關(guān)的信息。
查看系統(tǒng)內(nèi)核版本、位數(shù)
[root@getlnx05 ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga) Release: 5.7 Codename: Tikanga
LSB Version項(xiàng)顯示的是系統(tǒng)的內(nèi)核版本,其中amd64表示系統(tǒng)是64位的。
CentOS
查看系統(tǒng)發(fā)行版本 cat /etc/issue
[chenyurong@localhost local]$ cat /etc/issue CentOS release 6.5 (Final) Kernel r on an m
通過cat /etc/centos-release也可以查詢到一樣的信息。
查看系統(tǒng)內(nèi)核版本、位數(shù) more /proc/version
[chenyurong@localhost local]$ cat /proc/version Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013
Linux version 2.6.32-431.el6.x86_64顯示了Linux的版本,x86_64顯示了是64位的系統(tǒng)。通過uname -r也可以查到相關(guān)信息。
Oracle Linux
查看系統(tǒng)發(fā)行版本
[root@DB-Server ~]# cat /etc/issue Oracle Linux Server release 5.7 Kernel r on an m
通過cat /etc/oracle-release也可以查詢到相關(guān)信息。
查看系統(tǒng)內(nèi)核版本、位數(shù)
[root@DB-Server ~]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: EnterpriseEnterpriseServer Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage) Release: 5.7 Codename: Carthage
LSB Version顯示的是系統(tǒng)的內(nèi)核版本,其中amd64表示系統(tǒng)是64位的。
所有命令適用范圍總結(jié)
查看系統(tǒng)發(fā)行版本
命令 |
適用范圍 |
lsb_release -a |
所有Linux發(fā)行版 |
cat /etc/redhat-release |
RedHat系Linux |
cat /etc/issue |
所有Linux發(fā)行版 |
查看系統(tǒng)內(nèi)核位數(shù)
命令 |
適用范圍 |
uname -a、uname -r |
所有Linux發(fā)行版 |
cat /proc/version |
所有Linux發(fā)行版 |