查看linux机器是32位还是64位的方法

Linux系统
474
linux
linux 举报
2022-08-19

file /sbin/init 或者 file /bin/ls

/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped


如果显示 64-bit 则为64位;


file /sbin/init

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


如果显示为32 bit 则为32bit;


uname -a:

uname -a

Linux pmx002**.**.**  2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


x86_64表示64位机器


uname -a

Linux pmx0**.**.**    2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux


i686表示32位机器


i686 只是i386的一个子集,支持的cpu从Pentium 2 (686)开始,之前的型号不支持.


备注:


1. i386 适用于intel和AMD所有32位的cpu.以及via采用X86架构的32的cpu.


intel平台包括8086,80286,80386,80486,奔腾系列(1.2.3.4)、赛扬系列,Pentium D系列


以及centrino P-M,core duo 等.


2. X86_64 适用于intel的Core 2 Duo, Centrino Core 2 Duo, and Xeon 和AMD Athlon64/x2, Sempron64/x2, Duron64等采用X86架构的64位cpu.


3. PPC   适用于Apple Macintosh G3, G4, G5, PowerBook, and other non-Intel models

倒序看帖 只看楼主
热点关注
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
服务停止、启动、重启一体化脚本,万能语言启动脚本
shell参数判断
在后台用进程名运行bash脚本
shell脚本每行后面多了一个^M的原因和解决办法
定时检测服务,检测down掉后重启。系统检测到DMSERVER运行正常
挂载磁盘的时候遇到一个问题,挂载完磁盘之后重启服务器挂载的盘丢失了.
中标麒麟系统Your trial is EXPIRED and no VALID licens
termux 开启ssh并用用户名和密码登陆
组成共享库的目标文件和一般的目标文件有所不同,在编译时要加-fPIC和-share选项,例如:
gcc指定链接库路径后还是找不到库文件
./configure -build,-host,-target设置
shell脚本每行后面多了一个^M的原因和解决办法
shell 中 if [ “x${var}“ == “x“ ] 中 x的作用
查看linux机器是32位还是64位的方法