1. View the kernel version command:
1) [[email protected] ~]# cat/proc/version
Linux version 2.6.9-22.ELSMP ([email protected]) (GCC version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 1918:00:54 E DT 2005
2) [[email protected] ~]# uname-a
Linux q1test01 2.6.9-22.elsmp #1 SMP Mon Sep 18:00:54 EDT 2005x86_64 x86_64 x86_64 gnu/linux
3) [[email protected] ~]# uname-r
2.6.9-22.elsmp
2. There are three main ways to view Linux versions:
1) Log in to the server to perform lsb_release-a and list all version information, for example:
[Email Protected]_sys ~]# lsb_release-a
LSB Version:: 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
Distributor Id:redhatenterpriseas
description:red Hat Enterprise Linux as Release 4 (Nahant Update 4)
Release:4
Codename:nahantupdate4
[[Email Protected]_sys ~]#
Note: This command applies to all Linux, including Redhat, SuSE, Debian, and other distributions.
2) Log in to the Linux execution Cat/etc/issue, as follows:
[Email Protected]_sys ~]# cat/etc/issue
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Kernel \ r on an \m
[[Email Protected]_sys ~]#
3) Log in to the Linux execution Cat/etc/redhat-release, as follows:
[Email Protected]_sys ~]# cat/etc/redhat-release
Red Hat Enterprise Linux as Release 4 (Nahant Update 4)
[[Email Protected]_sys ~]#
Note: The specific version number can be seen directly in this way, such as AS4 Update 1
4) Log in to the Linux execution Rpm-q redhat-release, for example as follows:
[Email protected]_sys ~]# rpm-q redhat-release
redhat-release-5server-5.6.0.3
[[Email Protected]_sys ~]#
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 Update 1
Redhat-release-4as-3-Redhat Enterprise Linux as 4 Update 2
redhat-release-4as-4.1-Redhat Enterprise Linux as 4 Update 3
redhat-release-4as-5.5-Redhat Enterprise Linux as 4 Update 4
Another: 3rd), 4) Two methods are only valid for Redhat Linux
5) [[Email Protected]_sys ~]# File/bin/bash
/bin/bash:elf 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared L IBS), for Gnu/linux 2.6.9, stripped
[[Email Protected]_sys ~]#
6) [[Email Protected]_sys ~]# File/bin/cat
/bin/cat:elf 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for Gnu/linux 2.6.9, dynamically linked (uses shared Li BS), for Gnu/linux 2.6.9, stripped
[[Email Protected]_sys ~]#
Reprinted from: http://blog.csdn.net/zhuying_linux/article/details/6859286
Linux view kernel and system versions