封尘网

让学习成为一种习惯!

Linux下查看系统架构类型的几种方法

正常情况下我们在下载系统的时候会选择32位还是64位版本的类型。但是如果系统已经安装上了,如何知道此系统的版本型是32位还是64位呢?

区别:
32位的显示: i386
64位的显示:X86_64

方法1:uname -a

[root@Centos7 ~]# uname -a
Linux Centos7 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

方法2:arch命令

[root@Centos7 ~]# arch
x86_64

方法3:getconf命令,此命令主要用于显示系统环境变量配置。

[root@Centos7 ~]# getconf LONG_BIT
64

方法4:file命令

[root@Centos7 ~]# file /lib/systemd/systemd
/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x0727084b2a3f581b5f25d8617081543a444b9944, stripped
下面在Centos6.5的:

[root@Git-server ~]# file /sbin/init
/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

提醒:本文最后更新于 2840 天前,文中所描述的信息可能已发生改变,请谨慎使用。