1、getconf LONG_BIT or getconf WORD_BIT
例如:
[root@host]# getconf LONG_BIT
32
[root@host]# getconf WORD_BIT
32
2、file /bin/ls
例如:
[root@host]# file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
另外,还可以查看linux的版本详细信息:使用
lsb_release -a
[root@host]# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Release: 5.5
Codename: Tikanga