作者:码天下 | 来源:互联网 | 2017-06-19 23:01
有以下命令可以查看:#lsb_release-a[html]viewplaincopy[jifeng@jifeng01hadoop]$lsb_release-a
有以下命令可以查看:
# lsb_release -a
-
[jifeng@jifeng01 hadoop]$ 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.6 (Tikanga)
-
Release: 5.6
-
Codename: Tikanga
-
[jifeng@jifeng02 ~]$ lsb_release -a
-
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
-
Distributor ID: CentOS
-
Description: CentOS release 6.4 (Final)
-
Release: 6.4
-
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
-
[jifeng@jifeng01 hadoop]$ uname
-
Linux
-
[jifeng@jifeng01 hadoop]$ uname -r
-
2.6.18-238.el5
-
[jifeng@jifeng01 hadoop]$ uname -i
-
x86_64
-
[jifeng@jifeng01 hadoop]$ uname -a
-
Linux jifeng01 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
-
[jifeng@jifeng01 hadoop]$
以下二种方法适用于RedHat,CentOS
cat /etc/redhat-release
-
[jifeng@jifeng01 hadoop]$ cat /etc/redhat-release
-
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
-
[jifeng@jifeng02 ~]$ cat /etc/redhat-release
-
CentOS release 6.4 (Final)
rpm -q redhat-release
-
[jifeng@jifeng01 hadoop]$ rpm -q redhat-release
-
redhat-release-5Server-5.6.0.3