size of machine 64 or 32 bit

前端 未结 6 846
一整个雨季
一整个雨季 2021-02-15 17:32

If I am working on a Unix machine, how could I know the size of the machine whether it is 64-bit or 32-bit machine?

6条回答
  •  不知归路
    2021-02-15 18:31

    AIX you can do this:

    getconf KERNEL_BITMODE
    

    HP-UX you can do this:

    getconf KERNEL_BITS
    

    or just:

    getconf -a | grep KERN
    

    Sun Solaris you can do this:

    isainfo -v
    

    For Linux, yes, the uname -a should do the trick

提交回复
热议问题