William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

How to determinate if a given linux is 32 or 64 bits?

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: