如何查看Linux的版本位数
方法1. getconf LONG_BIT and getconf WORD_BITyangxm@silver-1:~$ getconf LONG_BIT
64
yangxm@silver-1:~$ getconf WORD_BIT
32
则为64bit
yangxm@silver-1:~$ getconf LONG_BIT
32
yangxm@silver-1:~$ getconf WORD_BIT
32
则为32bit
方法2. file /bin/lsyangxm@silver-1:~$ file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
则为64bit
方法3. uname –ayangxm@silver-1:~$ uname -a
Linux silver-1 2.6.35-32-server #66-Ubuntu SMP Mon Feb 13 21:21:41 UTC 2012 x86_64 GNU/Linux
则为64bit
[root@subvm ~]# uname -a
Linux subvm 2.6.9-42.ELsmp #1 SMP Sat Aug 1209:39:11 CDT2006 i686 i686 i386 GNU/Linux
则为32bit