How to identify 64 bit processor with cat /proc/cpuinfo
Solution 1
Use the lscpu command.
32bit example output:
$ lscpu
Architecture: i686
CPU op-mode(s): 32-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 4
Core(s) per socket: 1
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 26
Stepping: 5
CPU MHz: 2260.998
BogoMIPS: 4521.99
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
64bit example:
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 4
Thread(s) per core: 1
Core(s) per socket: 4
CPU socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Stepping: 6
CPU MHz: 2327.533
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 6144K
Solution 2
The flags
section will contain lm
if you have a Intel 64-/AMD 64-capable CPU. Other 64-bit architectures should have similar flags that you can look for.
Solution 3
To know if the installed Ubuntu is of 32 or 64 bits:
a) getconf LONG_BIT
b) uname -m
If it shows i686 or i386 it means 32 bits. If it shows x86_64 it means 64 bits.
If the CPU is of 32 bits Ubuntu must be of 32 bits. If the CPU is of 64 bits it can work in 64 or 32 bits. So we can choose: Ubuntu can be of 32 bits or of 64 bits.
To know if the CPU is of 32 or 64 bits:
a) grep -w lm /proc/cpuinfo
If we see lm in red is of 64 bits. Otherwise is of 32 bits.
b) sudo lshw | grep "description: CPU" -A 12 | grep width
It says clearly what we want to know.
Related videos on Youtube
Ullas Prabhakar
Updated on September 18, 2022Comments
-
Ullas Prabhakar over 1 year
I have
intel celeron d 3.06ghz processor
. Now I am using32 bit Ubuntu
and I wish to upgrade to64 bit Ubuntu
if myprocessor
allow. My doubt is how to identify64 bit processor
with cat /proc/cpuinfo command. it shows
clflush size : 64Does my processor support
64 bit
OS ?-
imz -- Ivan Zakharyaschev over 8 years
-
-
Paulo Scardine over 11 yearsAFAIK uname shows only information about the compiled kernel. Of course you can have a 32bit kernel instaled in 64bit hardware, but not the other way.
-
KamikazeCZ over 11 yearsI know, I changed it immediately. Now it should be OK.
-
Paulo Scardine over 11 years-1: bad karma - you just copied from the other answers.
-
KamikazeCZ over 11 yearsWell... I didn't but do your best.
-
glglgl over 10 yearsFirst part is obsolete. OP says "Now I am using 32 bit Ubuntu".
-
Paulo Scardine over 10 years
lsb_release -a
works for LSB compatible distros. -
Daniel Alder about 9 yearsFor those who are interested: This is what it shows if you are running a 32bit OS on a 64bit CPU:
Architecture: i686
/CPU op-mode(s): 32-bit, 64-bit