瞭解Linux發行版本的版本號是一項非常重要的事情,大多數軟件對系統的版本都有要求,發行版本號與軟件不匹配,軟件將無法安裝或者無法使用.這邊集合市面上流行的Linux發行版本版本號查詢方法.有了這邊文章,老闆再也不擔心我裝錯軟件了呢
1. 發行版本號查詢
Debian版本查詢:
# cat /etc/debian_version 5.0.7 # cat /etc/issue Debian GNU/Linux 5.0 \n \l
Ubuntu版本查詢:
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS" # cat /etc/issue Ubuntu 10.04.4 LTS \n \l
CentOS版本查詢:
# cat /etc/*-release CentOS release 6.4 (Final) CentOS release 6.4 (Final) CentOS release 6.4 (Final)
RedHat版本查詢:
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.0 (Santiago)
Fedora版本查詢:
$ cat /etc/fedora-release Fedora release 14 (Laughlin)
OpenSuSE版本查詢:
$ cat /etc/SuSE-release openSUSE 12.1 (x86_64) VERSION = 12.1 CODENAME = Asparagus
2. 查詢內核版本
# uname -r 2.6.32-358.14.1.el6.x86_64 # cat /proc/version Linux version 2.6.32-358.14.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jul 16 23:51:20 UTC 2013
網站:運維生存時間(轉載請註明出處)
網址:http://www.ttlsa.com/linux/query-linux-version-number-command/