You can view the following command: # lsb_release-a [html] viewplaincopy [jifeng @ jifeng01hadoop] $ the lsb_release-a has the following command to view: # lsb_release-
[Html]View plaincopy
- [Jifeng @ jifeng01 hadoop] $ lsb_release-
- 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
[Html]View plaincopy
- [Jifeng @ jifeng02 ~] $ Lsb_release-
- 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
This command applies to all linux releases, including Redhat, SuSE, and Debian.
[Html]View plaincopy
- [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-
- 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] $
The following two methods apply to RedHat, CentOScat/etc/redhat-release:
[Html]View plaincopy
- [Jifeng @ jifeng01 hadoop] $ cat/etc/redhat-release
- Red Hat Enterprise Linux Server release 5.6 (Tikanga)
[Html]View plaincopy
- [Jifeng @ jifeng02 ~] $ Cat/etc/redhat-release
- CentOS release 6.4 (Final)
Rpm-q redhat-release
[Html]View plaincopy
- [Jifeng @ jifeng01 hadoop] $ rpm-q redhat-release
- Redhat-release-5Server-5.6.0.3