查看Linux系統版本的命令(3種方法):
1、lsb_release -a,即可列出所有版本信息:
[root@localhost?~]#?lsb_release?-aLSB?Version:?:core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor?ID:?CentOS
Description:?CentOS?release?5.5?(Final)
Release:?5.5
Codename:?Final
這個命令適用於所有的Linux發行版,包括Redhat、SuSE、Debian…等發行版。
2、cat /etc/redhat-release,這種方法只適合Redhat系的Linux:
[root@localhost?~]#?cat?/etc/redhat-releaseCentOS?release?5.5?(Final)
3、cat /etc/issue,此命令也適用於所有的Linux發行版。
[root@localhost?~]#?cat?/etc/issueCentOS?release?5.5?(Final)
Kernel?\r?on?an?\m