如何判断Linux是32位还是64位

方法一:getconf LONG_BIT
在linux终端输入 getconf LONG_BIT 命令
如果是32位机器,则结果为32

 [root@localhost ~]# getconf LONG_BIT  #32位
    32
 [root@localhost ~]# getconf LONG_BIT  #64位
    64

方法二:uname -a
如果是64位机器,会输出x86_64

[root@localhost ~]# uname -a

方法三:file /sbin/init 或者 file /bin/ls
示例:32位机器
file /sbin/init

[root@localhost ~]# file /sbin/init

[root@localhost ~]# file /bin/ls
原文地址:https://www.cnblogs.com/Jace06/p/9258602.html