linux - find cpu bit

System/Linux 2014. 4. 21. 20:00


Linux Find If Processor / CPU is 64 bit / 32 bit ( long mode ~ lm )

by  on APRIL 30, 2006 · 62 COMMENTS· LAST UPDATED OCTOBER 13, 2010

in , , 

How do I determine if my CPU is 64bit or not under Linux operating systems?

You need to use the uname command, which prints system information including kernel version and whether kernel is 32 bit or 64 bit. You need to run the less /proc/cpuinfo command to determine if CPU is 64 bit or not.

Example - Find Out If Running Kernel Is 32 Or 64 Bit

Type the following command at the terminal, run:
$ 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 that you've a 64bit Linux kernel running. If you use see i386/i486/i586/i686 it is a 32 bit kernel.

How Do I Find Out CPU is 32bit or 64bit?

Simply type the following command and if you see lm in output, you have a 64 bit CPU based system:
$ grep flags /proc/cpuinfo
Output:

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 pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
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 pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
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 pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
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 pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

(Scroll to see all flags)

CPU Modes:

  • lm flag means Long mode cpu - 64 bit CPU
  • Real mode 16 bit CPU
  • Protected Mode is 32-bit CPU

See also:

Updated for accuracy!


source - http://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/








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.



I think the easiest way is by:

lscpu|grep "CPU op-mode"

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 4 at 21:12



source - http://unix.stackexchange.com/questions/14384/how-do-i-know-that-my-cpu-supports-64bit-operating-systems-under-linux







'System > Linux' 카테고리의 다른 글

linux - anacron  (0) 2014.05.05
linux - more  (0) 2014.04.25
linux - install centOS 6.5 in virtualbox VBoxManage  (0) 2014.04.11
gnome - gconf  (0) 2014.03.07
linux - saslpasswd2  (0) 2014.03.03
Posted by linuxism
,