How to determinate if a given linux is 32 or 64 bits?
Blogs20132013-08-09
How to determinate if a given linux is 32 or 64 bits?
When I use install Oracle Virtualbox (CentOS, Ubuntu) in windows, sometimes I am confused the installed linux is
32- or 64-bits when installed relative package such as various rpm, mongodb source etc. the command ’uname -a’ display:
$ uname -a
Linux hostname 2.6.32-358.14.1.el6.i686 #1 SMP
... i686 i686 i386 GNU/Linux
Make no sense to me. In stackoverflow.com I found the answer:
$ uname -m
x86_64 ==> 64-bit kernel
i686 ==> 32-bit kernel
so if return i686, it means 32-bit, while X86_64 means 64-bits. This saves me a lot when install rpm packages. By the way, the command ’lscpu’ also works.
