Linux System version command
First, check the system Kernel version command:
1) [[email protected] ~]# cat/proc/version Linux version 2.6.18-238.el5pae ([email protected]) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 14:42:44 EST 2010[[email protected] ~]#
2) [[email protected] ~]# UNAME-R2.6.18-238.EL5PAE
3) [[email protected] ~]# uname-alinux pgserver04 2.6.18-238.el5pae #1 SMP Sun Dec 14:42:44 EST. i686 i686 i386 GNU /linux[[email protected] ~]#
Second, view the Linux version:
1) Perform lsb_release-a to list all version information:
[Email protected] ~]# lsb_release-alsb Version:: core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32: Graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarchdistributor ID:RedHatEnterpriseServerDescription:Red Hat Enterprise Linux Server release 5.6 (Tikanga) Release:5.6codename:tikanga
Note: This command applies to all Linux, including Redhat, SuSE, Debian, and other distributions.
2) Execute cat/etc / issue, such as the following:
[Email protected] ~]# cat/etc/issuered Hat Enterprise Linux Server release 5.6 (tikanga) Kernel \ r on a \m
3) Execute Cat/etc/redhat-release
[Email protected] ~]# cat/etc/redhat-release Red Hat Enterprise Linux Server release 5.6 (Tikanga) [[email protected] ~]#
Note: The specific version number can be seen directly in this way, such as AS4 Update 1
4) Perform rpm-q redhat-release, for example as follows:
[Email protected] ~]# rpm-q redhat-releaseredhat-release-5server-5.6.0.3[[email protected] ~]#
Note: A so-called release number can be seen in this way, such as the above example is 5
There is a certain correspondence between the release number and the actual version, as follows:
Redhat-release-3as-1-Redhat Enterprise Linux as 3 redhat-release-3as-7.4-Redhat Enterprise Linux as 3 Update 4 redhat-release-4as-2, Redhat Enterprise Linux as 4 redhat-release-4as-2.4, Redhat Enterprise Linux as 4 UPDA Te 1 redhat-release-4as-3-Redhat Enterprise Linux as 4 Update 2 redhat-release-4as-4.1-Redhat Enterprise Lin UX as 4 update 3 redhat-release-4as-5.5-Redhat Enterprise Linux as 4 update 4
Note: 3rd), 4) Two methods are only valid for Redhat Linux
5) [[email protected] ~]# file/bin/bash/bin/bash:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses GKFX libs), for Gnu/linux 2.6.9, Stripped[[email protected] ~]#
6) [[email protected] ~]# file/bin/cat/bin/cat:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for Gnu/linux 2. 6.9, dynamically linked (uses GKFX libs), for Gnu/linux 2.6.9, Stripped[[email protected] ~]#
This article from the "7743530" blog, reproduced please contact the author!
Linux System version command