23

How can I find out that my CPU supports 64bit operating systems under Linux, e.g.: Ubuntu, Fedora?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
LanceBaynes
  • 39,295
  • 97
  • 250
  • 349
  • 1
    possible duplicate of [How come I installed Ubuntu 64 bit on a Pentium 4 machine?](http://unix.stackexchange.com/questions/3343/how-come-i-installed-ubuntu-64-bit-on-a-pentium-4-machine) – Gilles 'SO- stop being evil' Jun 04 '11 at 09:57
  • 1
    More generally, see [What do the flags in /proc/cpuinfo mean?](http://unix.stackexchange.com/q/43539) – Gilles 'SO- stop being evil' Jul 20 '12 at 01:45
  • Once you have checked the flags, then install the kernel package. Debian and Ubuntu, can run a 64bit kernel with a 32 bit userland. Installing the kernel is quick. Do not remove the old 32bit one, as you may need to go back to it. – ctrl-alt-delor Jul 11 '16 at 08:03

5 Answers5

33

I think the easiest way is by:

lscpu|grep "CPU op-mode"
Ikem Krueger
  • 479
  • 5
  • 4
  • 4
    This answer is the best. It shows you an explicit "32-bit" or "64-bit". I don't see why people choose the other answer over this one. You don't even need to grep anything. Just doing `lscpu` is so simple. If they don't have the `lscpu` command then I could see why they voted for the other one. – trusktr Jan 04 '14 at 21:12
  • 4
    The command that is the most portable across the largest variety of platforms is arguably the most useful. – Benjamin Goodacre Sep 09 '14 at 09:06
  • 1
    I got '32-bit, 64-bit' What does it mean? – dstonek Apr 10 '16 at 13:31
  • It is a 64-bit machine running in 32-bit mode. – Ikem Krueger Oct 06 '17 at 09:33
31

Execute:

grep flags /proc/cpuinfo

Find 'lm' flag. If it's present, it means your CPU is 64bit and it supports 64bit OS. 'lm' stands for long mode.

Alternatively, execute:

grep flags /proc/cpuinfo | grep " lm "

Note the spaces in " lm ". If it gives any output at all, your CPU is 64bit.

Update: You can use the following in terminal too:

lshw -C processor | grep width

This works on Ubuntu, not sure if you need to install additional packages for Fedora.

Deepak Mittal
  • 1,544
  • 13
  • 18
2

If your CPU is a 64bit one (x86-64), you can use it with a 64 bit OS.

Here is a list of 64bit CPUs: http://en.wikipedia.org/wiki/64-bit#Current_64-bit_microprocessor_architectures

MetroWind
  • 237
  • 1
  • 5
  • This is the ultra slow way, and not guaranteed to give you an answer. – trusktr Jan 04 '14 at 21:12
  • 2
    @trusktr: Yes. but all the other ways require Linux to be installed already. Not much help if you have an old Win32 machine and want to know if it will run a 64 bit *nix OS – Clifford May 09 '14 at 19:56
  • Same here. Found this useful, not having a running OS on the system in question to test it with. – ELLIOTTCABLE Oct 28 '14 at 00:38
2

via this command dmidecode -t processor we can check the processor capability.

muru
  • 69,900
  • 13
  • 192
  • 292
  • That outputs a ton of other stuff, and splits "64-bit capable" on a different line than it's vague heading ("Characteristics"), so it's difficult to parse. – sondra.kinsey Oct 04 '18 at 20:45
0

Don't rely on the high scoring answers to this question because these methods are not always correct.

I've a computer with a Intel Atom N230 CPU which according to all of the tests mentioned is capable to support 64 bit OS'es.

According to http://en.wikipedia.org/wiki/Intel_Atom#32-bit_and_64-bit_hardware_support the CPU is not capable of running 64 bit OS'es. I've tried to install a 64 bit Linux OS and it indeed refuses to do so. Installing a 32 bit Linux OS works.

wie5Ooma
  • 440
  • 1
  • 4
  • 13