View the CentOS version method with the following commands to view:
# lsb_release -a
lsb version : : core - 3.1 - ia32 : core - 3.1 - noarch : graphics - 3.1 - ia32 : graphics - 3.1 - noarch
Distributor ID: CentOS
Description: CentOS release 5.4 (Final)
Release: 5.4
Codename: Final
This command applies to all Linux, including Redhat, SuSE, Debian, CentOS, and other distributions.
[email protected] ~ # uname
Linux
[email protected] ~ # uname -r
2.6.18-164.el5
[[email protected] ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT 2010 i686 i686 i386 GNU/Linux
The following two ways apply to Redhat,centos
[email protected] ~ # cat /etc/redhat-release
CentOS release 5.4 (Final)
Log in to Linux execution Rpm-q redhat-release
#rpm -q redhat-release
or CentOS
[email protected] ~ # rpm -q centos-release
centos-release-5-4.el5.centos.1
Commands for the current version of the CentOS version corresponding to Redhat
# cat /proc/version
Linuxversion2.6.9-78.ELSMP ([email protected].CentOS.org) (gcc version3.4.6 20060404 (Red Hat 3.4.6-Ten)) #1 SMP Fri Jul 00:04:28 EDT
From for notes (Wiz)
[Linux Kernel] View the CentOS version method