Several Methods for viewing the linux version
(1) run the lsb_release command. FSG (Free Standards Group) organizes and develops a Standard LSB (Linux Standard Base) command to view the release information of linux compatibility.
[Root @ enmoteam1 oracle] # lsb_release-h
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to-v.
Options:
-V, -- version
Display the version of the LSB specification against which the distribution is compliant.
-I, -- id
Display the string id of the distributor.
-D, -- description
Display the single line text description of the distribution.
-R, -- release
Display the release number of the distribution.
-C, -- codename
Display the codename according to the distribution release.
-A, -- all
Display all of the above information.
-S, -- short
Use short output format for information requested by other options (or version if none ).
-H, -- help
Display this message.
[Root @ enmoteam1 oracle] # lsb_release-v
LSB Version: core-4.0-amd64: core-4.0-noarch: graphics-4.0-amd64: graphics-4.0-noarch: printing-4.0-amd64: printing-4.0-noarch:
[Root @ enmoteam1 oracle] # lsb_release-I
Distributor ID: RedHatEnterpriseServer
[Root @ enmoteam1 oracle] # lsb_release-d
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
[Root @ enmoteam1 oracle] # c
-Bash: c: command not found
[Root @ enmoteam1 oracle] # lsb_release-c
Codename: Santiago
[Root @ enmoteam1 oracle] # lsb_release-
LSB Version: core-4.0-amd64: core-4.0-noarch: graphics-4.0-amd64: graphics-4.0-noarch: printing-4.0-amd64: printing-4.0-noarch:
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Release: 6.3
Codename: Santiago
[Root @ enmoteam1 oracle] # lsb_release-s
: Core-4.0-amd64: core-4.0-noarch: graphics-4.0-amd64: graphics-4.0-noarch: printing-4.0-amd64:
[Root @ enmoteam1 oracle] #
(2) view/etc/issue, which is the default release version information during system installation. The file content will not change after the system is installed.
[Root @ enmoteam1 oracle] # cat/etc/issue
Oracle Linux Server release 6.3
Kernel \ r on an \ m
[Root @ enmoteam1 oracle] #
(3) The content of/proc/version is the same as that of uname-a, and the Linux kernel version is displayed.
[Root @ enmoteam1 oracle] # cat/proc/version
Linux version 2.6.39-200.24.1.el6uek.x86 _ 64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) #1 SMP Sat Jun 23 02:39:07 EDT 2012
[Root @ enmoteam1 oracle] # uname-r
2.6.39-200.24.1.el6uek.x86 _ 64
[Root @ enmoteam1 oracle] # uname-
Linux enmoteam1 2.6.39-200.24.1.el6uek.x86 _ 64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[Root @ enmoteam1 oracle] #
(4)/etc/redhat-release: The specific version number is displayed.
[Oracle @ enmoteam1 ~] $ Cat/etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[Oracle @ enmoteam1 ~] $