linux-命令

查询linux系统位数 - 32bit or 64bit:

        1,uname -a

        如果是32位输出:

        Linux zou-acertox42 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 i686 i686 i386 GNU/Linux

        如果是64位输出:

        Linux web1 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

       2,file /sbin/init

       32位: /sbin/init: ELF 32-bit LSB executable。。。。。。。。。。
       64位: /sbin/init: ELF 64-bit LSB executable。。。。。。。。。。

       3,file /bin/cat

       32位linux输出为:

       /bin/cat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped