Three common ways to view Linux versions

Source: Internet
Author: User

1) Log in toServicelsb_release-a, you can list all version information, such as:

[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 types of (2) (3)Methodvalid only for Redhat Linux

Three common ways to view Linux versions

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.