用这个看一下: file /bin/ls
如果显示像这样:
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), stripped
说明是:32 bit;
如果显示像这样:
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared libs), stripped
这是64 bit.
百度了一下,有些朋友说用:
uname -a
uname -m
但是都不行。看不出来,也可能是我不会看吧。
查看ubuntu系统版本信息 方法一:cat /etc/issue 返回结果:Ubuntu 8.04.1 \n \l 方法二:cat /proc/version 返回结果:Linux version 2.6.24-21-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Mon Aug 25 17:32:09 UTC 2008 方法三:uname -a 返回结果:Linux wwt-laptop 2.6.24-21-generic #1 SMP Mon Aug 25 17:32:09 UTC 2008 i686 GNU/Linux 方法四:lsb_release -a 返回结果: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 8.04.1 Release: 8.04 Codename: hardy 方法五:cat /etc/lsb-release 返回结果: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.04 DISTRIB_CODENAME=hardy DISTRIB_DESCRIPTION="Ubuntu 8.04.1"
方法六:仅仅查看内核版本 uname -r 返回结果: 2.6.15-51-386