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

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

2 Replies to “Is your Linux 32bits or 64bits

  1. You can use the last command to check. I test the command in Ubuntu 10.10. The result shown clearly 32-bit.
    So, use this command.
    file /bin/bash

Leave a Reply

Your email address will not be published. Required fields are marked *