查询linux发行版本号方法总结

时间:2022-05-03 04:06:26
 

了解Linux发行版本的版本号是一项非常重要的事情,大多数软件对系统的版本都有要求,发行版本号与软件不匹配,软件将无法安装或者无法使用.这边集合市面上流行的Linux发行版本版本号查询方法.有了这边文章,老板再也不担心我装错软件了呢

1. 发行版本号查询
Debian版本查询:

# cat /etc/debian_version
5.0.7

# cat /etc/issue
Debian GNU/Linux 5.0 \n \l

1
2
3
4
5
# 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

1
2
3
4
5
6
7
8
# 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)
1
2
3
4
#  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)
1
2
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)

Fedora版本查询:

$ cat /etc/fedora-release
Fedora release 14 (Laughlin)
1
2
$ cat /etc/fedora-release
Fedora release 14 (Laughlin)

OpenSuSE版本查询:

$ cat /etc/SuSE-release
openSUSE 12.1 (x86_64)
VERSION = 12.1
CODENAME = Asparagus
1
2
3
4
$ 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 (mockbuild@c6b10.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jul 16 23:51:20 UTC 2013

1
2
3
4
5
# 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 (mockbuild@c6b10.bsys.dev.centos.org) (gcc version 4.4.7 20