Using lscpu:
$ lscpu | grep op-mode CPU op-mode(s): 32-bit, 64-bit
$ lscpu | grep op-mode CPU op-mode(s): 32-bit
or check /proc/cpuinfo for the tm/lm flags. If lm exists it supports 64bit. If only tm exists, it only supports 32bit.
$ grep -w lm /proc/cpuinfo 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 syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority 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 syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
$ grep -w lm /proc/cpuinfo $ grep -w tm /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm
The architecture should be listed as x86_64 for 64bit or i686 for 32bit.
Using uname (-m or -p):
$ uname -m x86_64 $ uname -p x86_64
$ uname -m i686 $ uname -p i686
or using lscpu:
$ lscpu | grep -i arch Architecture: x86_64
$ lscpu | grep -i arch Architecture: i686
or using getconf:
$ getconf LONG_BIT 64
$ getconf LONG_BIT 32