uname -auname -m
Getconf word_bit long_bit can be queried in both 32bit and 64bit systems. The 32bit and 64bit systems are different. However, uname-A can be completely solved.
Take a look at this: File/bin/ls
If it is shown as follows:
/Bin/LS: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux 2.6.0, dynamically linked (uses SHARED libs), stripped
Description: 32 bit;
If it is shown as follows:
/Bin/LS: Elf 64-bit LSB executable, x86-64, Version 1 (sysv), for GNU/Linux 2.6.0, dynamically linked (uses SHARED libs), stripped
This is 64 bit.
Jingwen @ jingwen-Virtual-machine :~ $Uname-
Linux jingwen-Virtual-machine 2.6.38-8-generic # 42-ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
Jingwen @ jingwen-Virtual-machine :~ $Uname-m
I686
Jingwen @ jingwen-Virtual-machine :~ $Getconf word_bit
32
Jingwen @ jingwen-Virtual-machine :~ $
Take a look at this: File/bin/ls
If it is shown as follows:
/Bin/LS: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux 2.6.0, dynamically linked (uses SHARED libs), stripped
Description: 32 bit;
If it is shown as follows:
/Bin/LS: Elf 64-bit LSB executable, x86-64, Version 1 (sysv), for GNU/Linux 2.6.0, dynamically linked (uses SHARED libs), stripped
This is 64 bit.