32/64 bit版本:
1.getconf LONG_BIT
64 或 32
2.file /bin/ls
64bit=>/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
32bit=>/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
3.uname -a
結果為 x86_64 則為 64-bit否則為 32-bit.
Linux 版本:
1.lsb_release -a
2.cat /etc/redhat-release