How to view system and kernel versions under Linux

Source: Internet
Author: User

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 19 18:00:54 EDT 2005

2) [[email protected] ~]# uname-a

Linux q1test01 2.6.9-22.elsmp #1 SMP Mon Sep 18:00:54 EDT 2005 x86_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] ~]# lsb_release-a

LSB version:1.3

Distributor Id:redhatenterpriseas

description:red Hat Enterprise Linux as Release 4 (Nahant Update 1)

Release:4

Codename:nahantupdate1

[Email protected] ~]#

This command applies to all Linux, including Redhat, SuSE, Debian, and other distributions.

2) Log in to the Linux execution Cat/etc/redhat-release, as follows:

[Email protected] ~]# cat/etc/redhat-release

Red Hat Enterprise Linux as Release 4 (Nahant Update 1)

[Email protected] ~]#

In this way, you can see the specific version number directly, such as AS4 Update 1

3) log in to Linux to perform rpm-q redhat-release such as the following

[Email protected] ~]# rpm-q redhat-release

redhat-release-4as-2.4

[Email protected] ~]#

In this way, you can see a so-called release number, such as the above example is 2.4

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

Note: The two methods (2) (3) are valid only for Redhat Linux


This article is from "a long long time later" blog, please be sure to keep this source http://wahahaha.blog.51cto.com/4146629/1548182

How to view system and kernel versions under Linux

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.