How do I know if my linux kernel is running in 32bit or 64bit?

When I do a cat in /proc/cpuinfo it shows a line with clflushsize : 64

Does this mean my kernel is running in 64 bits?


Solution 1:

uname -a

will tell you the kernel - the end bit tells you the architecture.

Two examples:

My mac:

Darwin Mac.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

My Dreamhost hosting:

Linux ecco 2.6.24.5-serf-xeon-c6.1-grsec #1 SMP Tue Oct 7 06:18:04 PDT 2008 x86_64 GNU/Linux

i386 = 32 bit

x86_64 = 64 bit

Solution 2:

uname -m will give you the architecture you kernel is compiled for. If it prints i686 then your kernel is 32 bit, if x86_64 then it's 64 bit, assuming you have an Intel/AMD chip.