Showing posts with label 64bit or 32bit. Show all posts
Showing posts with label 64bit or 32bit. Show all posts

Thursday, May 21, 2015

Which version should I install? 32 bit or 64 bit? Ubuntu or CentOS?

I was posting two relevant articles on this topic:

Unix vs. Linux
 (http://onetipperday.blogspot.com/2014/07/unix-vs-linux.html)
Which version of tools I should install? i386 vs. x86_64, and 32bit vs. 64bit kernel (http://onetipperday.blogspot.com/2013/02/software-vs-hardware-i386-vs-x8664-and.html)

However, this can still be confusing sometimes... for example, when you visit the SRA toolkit download page: http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software

OK. Here is the short answer.

1. How to tell my CPU architecture is 32 bit or 64 bit?

$ uname -aIf the output is i386 or i586, it's 32 bit. If it's x86_64, it's 64 bit.

Ref: http://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/

2. How to tell my OS (operation system) kernel is 32 bit or 64 bit?

Note that the OS kernel can be different from the above hardware architecture. Usually the OS changes version following the update of hardware, but the 32bit version can work in a 64bit machine (not the other way around), so it might not be consistent. The Macbook Pro I am using is running a 32-bit kernel on a 64-bit processor (see my previous post). 

3. How to tell which OS I am using? CentOS or Ubuntu?

In my case, I used:
$ ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v "lsb" | cut -d'/' -f3 | cut -d'-' -f1 | cut -d'_' -f1

it returns redhat, which is part of CentOS now.

## For more detail, please refer terdon's answer in http://askubuntu.com/a/459425

Tuesday, February 19, 2013

Which version of tools I should install? i386 vs. x86_64, and 32bit vs. 64bit kernel

Maybe you are also often bothered by these terms like me. Let me explain what they mean.

i386
i386 stands for Intel 80386, was the first 32-bit processor introduced by Intel in 1985.  It's one of the x86 series products (e.g. 8086, 80286, 80386, 80486...), but again, it's the first 32bit processor (not all x86 are 32bit). That might be the reason why people still use i386 to indicate any 32-bit architecture (e.g. i586=Pentium, Core 1).
x86-64
x86-64 is an 64-bit extension of 32-bit generation of x86 instruction set. It's first implemented by AMD and supported by AMD64 processor. It's the beginning of 64-bit generation. Most on-market CPU models, like Interl Core 2 and the one I am using Intel Core i7, are based on x86-64 architecture. 

These terms tell you the hardware architecture of your processor. You can tell it by the brand/model or by running command like "uname -m" in linux terminal. 

Now let's talk about the 32-bit and 64-bit kernel, which is for the operation system. OS always changes following the hardware. When people design a software/tool, they can compile it to work in a 32-bit way, or in a 64-bit way. The 32bit version should be able to work in a 64bit machine, but not the other way around. 

For example, the MacBook Pro I am using has following setting:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro6,2
      Processor Name: Intel Core i7  <-- 64-bit processor
      Processor Speed: 2.66 GHz
      Number Of Processors: 1
      Total Number Of Cores: 2
      L2 Cache (per core): 256 KB
      L3 Cache: 4 MB
      Memory: 4 GB
      Processor Interconnect Speed: 4.8 GT/s
      Boot ROM Version: MBP61.0057.B0C
      SMC Version (system): 1.58f16

    System Software Overview:

      System Version: Mac OS X 10.6.8 (10K549)
      Kernel Version: Darwin 10.8.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Secure Virtual Memory: Enabled
      64-bit Kernel and Extensions: No  <-- 32-bit kernel
      Time since boot: 7 days 6:22


It's a 32-bit kernel running on a 64-bit processor. This combination happen for Macbook Pro released before the end of 2010. Apple has compiled both versions for these OS and allow users to switch easily (see here for detail: http://support.apple.com/kb/HT3773)