Site icon David Yin's Blog

Is your Linux 32bits or 64bits

Some times you need to find out what version is your Linux OS. Just like when I need to download a module, I have to find out which one is right for my OS. Then I can download 32bit, or 64bit package.
The most common way to find your Linux installation is enter the following shell command.

uname -a

or

uname -m

i386 => 32bits, x86_64 => 64bits


Let’s see how to use the other way to check it.

file /bin/bash

If it is 64bits, the system return the results as below:
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
If it is 32bits, it may looks like below:
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

Exit mobile version