How to know what version of Linux you are using

Source: Internet
Author: User

1. Run the following command to view the kernel version:

1) [root @ q1test01 ~] # Cat/proc/version

Linux version 2.6.9-22. elsmp (bhcompile@crowe.devel.redhat.com) (GCC version 3.4.4 20050721 (Red Hat 3.4.4-2) #1 SMP mon Sep 19 18:00:54 EDT 2005

2) [root @ q1test01 ~] # Uname-

Linux q1test01 2.6.9-22. elsmp #1 SMP mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

3) [root @ q1test01 ~] # Uname-R

2.6.9-22. elsmp

2. view the Linux version:

1) log on to the server and execute lsb_release-a to list all version information, for example:

[Root@3.5.5Biz-46 ~] # [Root @ q1test01 ~] # Lsb_release-

LSB version: core-3.0-amd64: core-3.0-ia32: core-3.0-noarch: Graphics-3.0-

Ia32: graphics-3.0-noarch

Distributor ID: redhatenterpriseas

Description: Red Hat Enterprise Linux as Release 4 (nahant Update 2)

Release: 4

Codename: nahantupdate2

Note: This command applies to all Linux releases, including RedHat, Suse, and Debian.

2) log on to Linux and run CAT/etc/issue, for example:

[Root @ q1test01 ~] # Cat/etc/issue

Red Hat Enterprise Linux as Release 4 (nahant Update 2)

Kernel \ r on an \ m

3) log on to Linux and run CAT/etc/RedHat-release, for example:

[Root @ q1test01 ~] # Cat/etc/RedHat-release

Red Hat Enterprise Linux as Release 4 (nahant Update 2)

Note: In this mode, you can see the specific version number, such as as4 update 1.

4) log on to Linux and execute rpm-Q RedHat-release, for example:

[Root @ q1test01 ~] # Rpm-Q RedHat-release

Redhat-release-4AS-3

Note: in this way, you can see a so-called release number. For example, the above example is 3.

There is a certain correspondence between the release number and the actual version, as shown below:

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

Other methods: 3rd) and 4) are only valid for Redhat Linux.

 

Check whether the Linux machine is 32-bit or 64-bit:

File/sbin/init orFile/bin/ls

/Sbin/init: elf64-bitLSB executable,
X86-64, Version 1 (sysv), dynamically linked (uses SHARED libs), for GNU/Linux 2.6.18, stripped

64-bit is displayed;

File/sbin/init
/Sbin/init: elf32-bitLSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux
2.2.5, dynamically linked (uses SHARED libs), stripped

32 bit if displayed;

Uname-:

Uname-
Linux pmx002 **. **. ** 2.6.32-71. el6.x86 _ 64 #1 SMP wed Sep 1 01:33:01 EDT 2010X86_64X86_64
X86_64 GNU/Linux

X86_64 indicates a 64-bit Machine

Uname-
Linux pmx0 **. **. ** 2.6.9-5. elsmp #1 SMP wed Jan 5 19:30:39 est 2005I686I686
I386 GNU/Linux


I686 indicates a 32-bit Machine

I686 is only a subset of i386, and the supported cpu starts from Pentium 2 (686), which is not supported by the previous model.

Note:

1. i386 is applicable to all 32-bit intel and AMD CPUs and 32-bit CPU via X86 architecture.

Intel platforms include 8086,80286, 80386,80133, Pentium series (1.2.3.4), sai Yang series, and Pentium D series

As well as Centrino P-M, Core Duo and so on.

2. x86_64 is applicable to Intel's 64-bit CPU with X86 architecture, including core 2 Duo, Centrino Core 2 Duo, and Xeon and AMD athlon64/X2, sempron64/X2, and duron64.

3. PPC applies to Apple Macintosh G3, G4, G5, PowerBook, and other non-Intel Models

The installation of a DVD includes more software than the installation of a CD, and the installation of a DVD also includes two graphical interfaces (KDE and gnome ).

4. jigdo

You can also download the ora release through jigdo. Jigdo can accelerate the download of the ISO image of the installation disk. Unlike the BT download wait task, jidgo automatically locates the fastest backup storage (using the fedora image manager) and downloads the required files from it. To reduce the required network traffic, jigdo can scan existing DVD or CD media. This feature is particularly useful to the following users.

 

Getconf long_bit
Run the following command on 32-bit and 64-bit machines:

[B @ 002 ~] $ Getconf long_bit
64

[Root @ pmx4/] # getconf long_bit
32

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.