Thursday, April 26, 2012

checking cpu architecture in linux

Sponsored Links
You may have to check which is the architecture of your linux system 32 bit or 64 bit. Here there is one thing needs to keep in mind. Whether you are checking the version of installed os kernel or the architecture of underlying cpu. It is possible that Operating system is 32 but cpu has 64 bit support. This post explains how to find or check the architecture of the Linux Operating system and cpu.

The following commands will only show version of installed Linux kernel (OS).

#uname -a


[root@test1 ~]# uname -a
Linux test1.lukup.internal 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux
[root@test1 ~]# arch
[root@test1 ~]#

i386/i586/i686 all means its a 32 bit os.
x86_64 means it is a 64 bit os.

If you want to know the architecture of the cpu. You have to check the cpu specifications. See the following commands

The following command will give all the information about cpu
cat /proc/cpuinfo

[root@test1 ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family       : 6
model             : 23
model name      : Pentium(R) Dual-Core  CPU      E5200  @ 2.50GHz
stepping          : 10
cpu MHz         : 2499.684
cache size        : 2048 KB
physical id        : 0
siblings             : 2
core id             : 0
cpu cores         : 2
fdiv_bug           : no
hlt_bug             : no
f00f_bug           : no
coma_bug         : no
fpu                    : yes
fpu_exception   : yes
cpuid level        : 13
wp                    : yes
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 ht nx constant_tsc pni
bogomips        : 5004.21
[root@test1 ~]# 

To check your system is 32 bit or 64 bit, check the flags field.
#grep flags /proc/cpuinfo

IM or im flag means Long mode cpu - 64 bit CPU
Real mode 16 bit CPU
Protected Mode is 32-bit CPU

In Debian Ubuntu systems you can use the following commands
#cat /proc/cpuinfo |grep ” lm”
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.