Linux Summary (3): View Linux versions

Source: Internet
Author: User

How do I view the version information used by Linux systems? The following article collects and collates some common ways to view Linux system versions. Because there are only Oracle Linux, Centos Linux, Redhat Linux three versions of Linux at hand, such as Debian, Ubuntu and other Linux systems, the following methods are not tested in these versions.

1:more/etc/issue Command View

1.1 Oracle Linux

[[Email protected] ~] # more/etc/issue
Oracle Linux Server Release 5.7
Kernel \ r on an \m

1.2 Centos Linux

[[Email protected] ~] # more/etc/issue
CentOS Release 6.4 (Final)
Kernel \ r on an \m

1.3 RedHat Linux

[[Email protected] ~] # more/etc/issue
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Kernel \ r on an \m

2:lsb_release-a Command View

2.1 Oracle Linux

[[Email protected] ~] # 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:enterpriseenterpriseserver
Description:enterprise Linux Enterprise linux Server release 5.7 (Carthage)
release:5.7
Codename:carthage

2.2 Centos Linux

[[Email protected] ~] # lsb_release-a
LSB Version:: base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64: Graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor Id:centos
Description:centos Release 6.4 (Final)
release:6.4
Codename:final

2.3 RedHat Linux

[[Email protected] ~] # 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:redhatenterpriseserver
description:red Hat Enterprise Linux Server release 5.7 (Tikanga)
release:5.7
Codename:tikanga

3:cat/etc/redhat-release Command View

This command should only be part of Linux, not all versions of Linux can use the command

3.1 Oracle Linux

[[Email protected] ~]
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[[email protected] etc] # cat/etc/*release
Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Oracle Linux Server Release 5.7
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[[email protected] etc] # ls/etc/*lease
/etc/enterprise-release/etc/oracle-release/etc/redhat-release

3.2 Centos Linux

[[Email protected] ~]
CentOS Release 6.4 (Final)
[[Email protected] ~] # cat/etc/*release
CentOS Release 6.4 (Final)
LSB_VERSION=BASE-4.0-AMD64:BASE-4.0-NOARCH:CORE-4.0-AMD64:CORE-4.0-NOARCH:GRAPHICS-4.0-AMD64: Graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS Release 6.4 (Final)
CentOS Release 6.4 (Final)
[[Email protected] ~] # ls/etc/*release
/etc/centos-release/etc/lsb-release/etc/redhat-release/etc/system-release

3.3 RedHat Linux

[[Email protected] ~]
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[[Email protected] ~] # cat/etc/*release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[[Email protected] ~] # ls/etc/*release
/etc/redhat-release
[Email protected] ~]#

4 rpm-q redhat-release Command view, only for Redhat Linux

[[Email protected] ~] # rpm-q Redhat-release
redhat-release-5server-5.7.0.3

Linux Summary (3): 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.