找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 服务器运维 查看内容

判断linux是64位还是32位

作者:模板之家 2019-11-5 18:01 11406人关注

判断linux是64位还是32位的方法是:在linux终端输入getconf LONG_BIT命令,如果是32位机器则结果为32;反之如果是64位机器则为64。

方法一:

getconf LONG_BIT

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

例如:

[root@localhost ~]# getconf LONG_BIT
32

如果是64位机器则结果为64。

[root@localhost ~]# getconf LONG_BIT
64

方法二:

uname -a

如果是64位机器会输出x86_64。

[chenzhou@testweb01 ~]$ uname -a
Linux testweb01 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

可以看到uname-a执行后的结果中输出了x86_64说明该机器是64位的,否则代表该机器是32位的。

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux

路过

雷人

握手

鲜花

鸡蛋
来自: [db:来源]

全部回复(0)

发表评论