To find if cpu is 32bit or 64 bit in linux

Here are two ways of finding out,using linux, whether a processor on a system is 32bit or 64 bit.

1. Using proc entry.

Run the command

$ cat /proc/cpuinfo | grep address\ sizes address sizes : 40 bits physical, 32 bits virtual

The above output clearly indicates that the address size of the cpu is 32 bits and hence does not support 64 bit.

2. Using the command cpuid.

For this we will have to install the package cpuid

$ sudo apt-get install cpuid

After the installation run the command

cpuid | grep address Maximum linear address: 32; maximum phys address 40

From the above output too we can conclude that the cpu is a 32bit architecture.

Tags: ,
Copyright 2017. All rights reserved.

Posted September 16, 2013 by Tux Think in category "Linux