Several ways to view the Linux version number

Source: Internet
Author: User

(1) Lsb_release command view a command for the LSB (Linux standard Base) standards developed by FSG (Free Standards Group) to view distribution information for Linux compatibility


[Email protected] 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.
[Email protected] 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
[Email protected] oracle]# lsb_release-i
Distributor Id:redhatenterpriseserver
[Email protected] oracle]# lsb_release-d
description:red Hat Enterprise Linux Server release 6.3 (Santiago)
[[Email protected] oracle]# C
-BASH:C: Command not found
[Email protected] oracle]# lsb_release-c
Codename:santiago
[Email protected] oracle]# lsb_release-a
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
[Email protected] oracle]# lsb_release-s
: Core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

[Email protected] oracle]#


(2)/etc/issue view, is the default release version number information when the system is installed. Usually the contents of the file will not change after the system is installed.

[Email protected] oracle]# cat/etc/issue
Oracle Linux Server Release 6.3
Kernel \ r on an \m


[Email protected] oracle]#

(3)/proc/version and uname-a display the same content, showing the Linux kernel version.

[Email protected] oracle]# cat/proc/version
Linux version 2.6.39-200.24.1.el6uek.x86_64 ([email protected]) (GCC version 4.4.6 20110731 (Red Hat 4.4.6-3) (gcc)) #1 S MP Sat June 02:39:07 EDT 2012
[Email protected] oracle]# uname-r
2.6.39-200.24.1.el6uek.x86_64
[Email protected] oracle]# uname-a
Linux enmoteam1 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat June 02:39:07 EDT x86_64 x86_64 x86_64 gnu/linux
[Email protected] oracle]#


(4)/etc/redhat-release can see the detailed version
[Email protected] ~]$ cat/etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[Email protected] ~]$




Several ways to view the Linux version number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.