How do I know if my Linux is 32 bit or 64 bit? nixCraft

Spread the love

I need to find out if my Linux server is running on 32-bit or 64-bit system. How do I know if my Linux is 32 bit or 64 bit?

To check if your Linux server is running a 32-bit or 64-bit system, try the following commands:

  1. Get ALL info about CPU on Linux, Execute: lscpu or cat /proc/cpuinfo
  2. Is my running Linux kernel 32bit or 64 bit? Run: getconf LONG_BIT
  3. Is my CPU in 32bit or 64 bit mode? Run: grep -o -w 'lm' /proc/cpuinfo | sort -u

Linux know information about the CPU architecture

Type the following lscpu command:
How to Find if Linux is Running on 32-bit or 64-bit
From the above output it is clear that I have:

  • CPU: AMD Ryzen 7 1700 Eight-Core Processor
  • Architecture: x86_64
  • CPU can run: 32bit or 64-bit operating system

Find out CPU is 32bit or 64bit on a Linux system

Simply run the following grep command
grep -o -w 'lm' /proc/cpuinfo | sort -u
Sample outputs:


The lm flag means long mode cpu i.e. 64 bit CPU. For more info type the following cat command to get complete info on your CPU:
cat /proc/cpuinfo
cat /proc/cpuinfo | more

How do I know if my Linux is 32 bit or 64 bit?

Now you know you have an AMD CPU that can run both 32bit and 64 bit operating systems. But, how do I know if my current kernel and Linux distro are 64-bit or 32-bit? Fear not, run the following command:
getconf LONG_BIT
Sample outputs:


The getconf command checks if the Linux kernel is 32 bit or 64 bit. The 64 means I am running 64 bit Linux kernel and Linux distro.

Other Linux command to check if I have a 32-bit or a 64-bit OS

uname -i
For 64bit you will get x86_64 and i386 for 32bit Intel CPU.

A note about GUI method

Open your Linux distros, System Settings window, and select the Details:
How To Check If A Linux System Is 32 bit Or 64 Bit

Use the lshw command

Execute the following lshw command to list all info about CPU:
sudo lshw -c cpu
Sample outputs:

 *-cpu description: CPU product: AMD Ryzen 7 1700 Eight-Core Processor vendor: Advanced Micro Devices [AMD] physical id: f bus info: cpu@0 version: AMD Ryzen 7 1700 Eight-Core Processor serial: Unknown slot: AM4 size: 1302MHz capacity: 3750MHz width: 64 bits clock: 100MHz capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca cpufreq configuration: cores=8 enabledcores=8 threads=16


You learned that most Intel-based servers and the computer could run both 32-bit and 64-bit operating system. Further you learned the various command line option to determine whether you are running a 32-bit or 64-bit version of Linux kernel and operating systems.


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting.


Posted by News Monkey