linux-to see if the system is 32-bit or 64-bit

Source: Internet
Author: User

You can use the command "getconf long_bit" To view if the returned result is 32, the description is 32 bits, and the result returned is 64, the description is 64 bits. You can also use the command "uname-a" To view, the output of the results, if there is x86_64 is 64-bit, not 32-bit.

A few ways to see how many bits Linux is: Check whether the Linux machine is a 32-bit or 64-bit method:
Method One: File/sbin/init or File/bin/ls

The results are as follows:
/sbin/init:elf 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for Gnu/linux 2.6. Stripped,

If the display 64-bit is 64 bits;
File/sbin/init/sbin/init:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), for gnu/linux2.2.5, dynamically linked (uses shared libs), stripped if displayed as a 32bit;
Method Two: Uname-a
Linux pmx002**.**.** 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT-x86_64 x86_64 x86_64 gnu/linuxx86_64 64-bit machine
Uname-a
Linux pmx0**.**.** 2.6.9-5.elsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 gnu/linuxi686



Represents a 32-bit machine

Method Three: It is also the simplest way to see whether Linux is 32-bit or 64-bit:
Getconf Long_bit

Run the following command on both 32-bit and 64-bit machines, with the following results:
[Email protected] ~]$ getconf long_bit
64
[Email protected]/]# getconf long_bit
32

linux-to see if the system is 32-bit or 64-bit

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.