It happens many times. Often new Linux system administrators and user(s) get confused. They are not able to determine if Linux system can run a 64 bit kernel version (and application) or not. There is simple way to find out:
(a) Ask your hardware vendor
(b) Find out yourself by reading manuals
(c) Or run the following commands:
Here is output from one of my production Dual Opteron server:
$ less /proc/cpuinfo
Output:
processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron (tm) Processor 848 stepping : 10 cpu MHz : 2197.161 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips : 4308.99 TLB size : 1088 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp processor : 1 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron (tm) Processor 848 .... ... *** Output truncated *** ....
Look for flag entry in above output. If you see lm flags then you will able to run 64 bit kernel and applications. Now consider output from my Workstation (32 bit system you will not able to find out lm [long mode] flag):
$ less /proc/cpuinfo
Output:
processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 1 model name : Intel(R) Celeron(R) CPU 1.70GHz stepping : 3 cpu MHz : 1717.118 cache size : 128 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm bogomips : 3437.80
You can also type command uname command to find out this info:
$ 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
The x86_64 confirms you can run 64 bit apps. You can also use live CD such as Knoppix to boot and find out this info.



18 comment
this was neat and very informative with out any garbage information.. Short and sweet
uname -a return information about the installed kernel, not the processor. So if you don’t have the x86_64 you may have however a 64 bit processor
very nice trick. Thanks.
thank you!
I this info is confusing in my Linux box when I run this command:
cat /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss nx lm constant_tsc up pni cx16 lahf_lm
and my uname -a command gives this info:
#1 SMP Fri Jan 26 14:15:21 EST 2007 i686 i686 i386 GNU/Linux
now what should I conclude does I am using both 32 and 64 bit?
$>cat /proc/cpuinfo contains ‘lm’
but $>uname -a contains ‘i686 i686 i386…’
that must mean you are using a 32 bit linux os on a 64 bit capable hardware.
This is not correct at all – please read the full thread why…
Niels.
http://dettenbach.de
Sorry Neils, you are quite authoritatively wrong.
uname -i is enough to know if the kernel is RUNNING in 64-bit mode. If it was compiled for amd64 and is able to run (since you are able to run uname), obviously the OS is in 64 bit mode.
Prior to installing a 64-bit OS, you can look at /proc/cpuinfo flags to see if the CPU supports 64 bit mode.
So David’s inference is accurate.
I think that is showing that you have a CPU capable of 64-bit, but only have the 32-bit linux kernel running on the machine.
if you use
uname -i
You will get either ‘i386’ for 32 bit OS or ‘X86_64’ for 64-bit OS.
Thanks a lot!!! Really informative stuff.
My system can run 64bit version of apps and OS. I am running 32bit currently. Changing it to 64bit will give any advantages ?
“uname” just gives you out how your sys / kernel was compiled and – not the hardware specs – and there are many situations where differences (could) appear there. cat /proc/cpuinfo is not responsible too in many cases (i.e. several Intel XEONs). If uname shows a 64 then you (should) HAVE a 64bit (capable) CPU (in this case you are on step 6 of my “check list” at bottom) – but not vice versa!
Just to sum up the discussion here: To find out if a cpu is 64 bit capable you have the following options – from less responsible to responsible:
1.) uname
2.) getconf LONG_BIT / cat /usr/include/asm/cpufeature.h
3.) cat /proc/cpuinfo
4.) DMI / dmidecode
5.) read the official CPU specs
6.) try to boot a 64bit linux (i.e. live system)
This means uname is the option with the lowest trust in this question – the only reliable way to find out if the CPU is 64bit capable is 6.).
cheers,
Niels.
The “dmidecode” is the best option! You need to be “root” or use “sudo”.
E.g.
sudo dmidecode
Look for
Characteristics:
in the CPU section.
In fact you can use the following:
sudo dmidecode –type processor
> The “dmidecode†is the best option!
sorry, but not really, as there are several non working (means non cordect) DMI implementations (from bith sides – regarding hard- as software) out known to be wrong or incorrect.
This is why there are know scenarios where even dmidecode does not give a clear answer to this questions – take a look at some history of dmi implementations and bug reports within the net..
The BEST (means most reliable) options are 5.) – read the official CPU specs or 6.) try to run a 64bit OS.
cheers,
Niels.
Great info. It makes me more clear about 32bit/b4bit identification
Thank you guys for the information. It is really helpful