Linux how to find if processor is 64 bit / 32 bit
Q. Quick question, how to determine if CPU is 64bit under Linux?
A. You need to use uname command which, print system information including kernel version and whether it has 32 bit or 64 bit CPU. You can also use less /proc/cpuinfo linux command determine if it is 64 bit cpu or not.
Example
$ uname -a
Output:
Linux ora100 2.6.5-7.252-smp #1 SMP Tue Feb 14 11:11:04 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux
x86_64 GNU/Linux indicates I have 64bit CPU. If you use see i386/i486/i586/i686 it is a 32 bit CPU.
You can also use getconf to print 32 bit or 64 bit system:
$ getconf LONG_BIT
Output:
64
The -m option to uname print the machine hardware name:
$ uname -m
Output:
x86_64
See also:
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Howto find out AIX UNIX CPU information, clock speed
- Linux display CPU information - number of CPUs and their speed
- Unix command to find CPU Utilization
- Linux display each multiple SMP CPU processors utilization individually
- Why does Linux top command shows two CPU when I have only one processor?
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: 64_bit_cpu, cpuinfo, find out 64 or 32 Linux, getconf LONG_BIT, kernel_version, linux_32_bit_cpu, linux_64_bit_cpu, redhat 32 or 64 bit, smp, suse 32 bit or 64, system_information, uname -a, uname -m, uname_command ~ Last updated on: December 19, 2007



January 29th, 2008 at 6:05 am
Thanks for this short and sweet information without too much garbage….
March 27th, 2008 at 8:14 am
all methods above are wrong. If the system was installed with 32bit OS the result will always be 32 unless it has a 64bit Linux running.
The correct way to do is:
cat /proc/cpuinfo
and look for flag “lm” in the flags: column. If it’s there then it’s 64bit CPU no matter Intel or AMD.