"Share" Five ways to view system information such as Linux system version numbers such as Ubuntu/redhat

Source: Internet
Author: User


The first method :
# lsb_release-a
LSB Version:: core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32: Printing-4.0-noarch
Distributor Id:centos
Description:centos Release 5.7 (Final)
release:5.7
Codename:final

This command applies to all versions of Linux that comply with the LSB specification, including Redhat, SuSE, Debian, Ubuntu, CentOS, and other distributions.

The next command cannot view the current system name and version, but it can display system core information.
[Email protected] ~ # uname
Linux
[Email protected] ~ # Uname-r
2.6.18-164.el5
[Email protected] ~]# uname-a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT. i686 i686 i386 Gnu/linux

The following two ways apply to Redhat,centos

[Email protected] ~ # Cat/etc/redhat-release
CentOS Release 5.7 (Final)

Log in to Linux execution Rpm-q redhat-release

#rpm-Q Redhat-release
or CentOS

[Email protected] ~ # Rpm-q Centos-release
Centos-release-5-7.el5.centos.1

The fourth method:

Commands for the current version of the CentOS version corresponding to Redhat

This command is not accurate under CentOS, and the system and version shown are also red Hat 3.4.6-10.

# cat/proc/version
Linux version 2.6.9-78.ELSMP ([email protected]) (GCC version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Fri Jul 25 00:04:2 8 EDT 2008

And this command is used on Ubuntu, the display of smart see is Ubuntu, but do not see the version.

One last method:

#cat/etc/issue

Under CentOS perform the display as:

CentOS Release 5.7 (Final)
Kernel \ r on an \m


or shown under Ubuntu as:

Ubuntu 11.04 \ \l


You can view the version number of the Ubuntu that is currently running.

"Share" Five ways to view system information such as Linux system version numbers such as Ubuntu/redhat

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.