--linux Operating system number of bits viewed
----------------------2014/05/11
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 results are as follows:/sbin/init:elf 64-bit LSB executable, x86-64, version 1 (SYSV), Dyna Mically linked (uses shared libs), for Gnu/linux 2.6.18, stripped if show 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, dynamic Ally linked (uses shared libs), stripped if displayed as a 32bit;
Method Two : uname-a:uname-a Linux pmx002**.**.** 2.6.32-71.el6.x86_64 SMP Wed Sep 1 01:33:01 EDT x86_64 x86 _64 x86_64 gnu/linuxx86_64 represents 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 32-bit machine
Method Three : It is also the simplest way to see whether Linux is 32-bit or 64-bit: getconf Long_bit runs the following command on 32-bit and 64-bit machines, the results are as follows:
[email protected] ~]$ getconf long_bit
[email protected]/]# getconf long_bit