View centos version
You can view the following commands: # lsb_release-a [html] view plaincopy
- [Jifeng @ jifeng01hadoop] $ lsb_release-a
- LSBVersion: 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
- DistributorID: RedHatEnterpriseServer
- Description: RedHatEnterpriseLinuxServerrelease5.6 (Tikanga)
- Release: 5.6
- Codename: Tikanga
[Html] view plaincopy
- [Jifeng @ jifeng02 ~] $ Lsb_release-a
- LSBVersion: 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:
- DistributorID: CentOS
- Description: CentOSrelease6.4 (Final)
- Release: 6.4
- Codename: Final
This command applies to all linux releases, including Redhat, SuSE, and Debian. [Html] view plaincopy
- [Jifeng @ jifeng01hadoop] $ uname
- Linux
- [Jifeng @ jifeng01hadoop] $ uname-r
- 2.6.18-238. el5
- [Jifeng @ jifeng01hadoop] $ uname-I
- X86_64
- [Jifeng @ jifeng01hadoop] $ uname-
- Linuxjifeng012.6.18-238. el5 #1SMPSunDec1914: 22: 44EST2010x86_64x86_64x86_64GNU/Linux
- [Jifeng @ jifeng01hadoop] $
The following two methods apply to RedHat, CentOScat/etc/redhat-release [html] view plaincopy
- [Jifeng @ jifeng01hadoop] $ cat/etc/redhat-release
- RedHatEnterpriseLinuxServerrelease5.6 (Tikanga)
[Html] view plaincopy
- [Jifeng @ jifeng02 ~] $ Cat/etc/redhat-release
- CentOSrelease6.4 (Final)
Rpm-q redhat-release [html] view plaincopy
- [Jifeng @ jifeng01hadoop] $ rpm-qredhat-release
- Redhat-release-5Server-5.6.0.3