View Linux System version commands

Source: Internet
Author: User

One. To view the kernel version command:

1) [[Email Protected]_sys ~]# cat/proc/version
Linux version 2.6.18-238.el5 () (GCC version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 14:22:44 EST 2010
[[Email Protected]_sys ~]#

2) [[Email Protected]_sys ~]# uname-r
2.6.18-238.el5
3) [[Email Protected]_sys ~]# uname-a
Linux sor_sys.99bill.com 2.6.18-238.el5 #1 SMP Sun Dec 14:22:44 EST x86_64 x86_64 x86_64 gnu/linux
[[Email Protected]_sys ~]#

Two. To view the Linux version:

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 ~]#

View Linux System version commands

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.