Get OS version (32 bit or 64 bit) in Linux

To get OS version i.e 32 bit or 64 bit, just run the following command in terminal.

getconf LONG_BIT

This will return the number your processor is based on, 32-bit processor or 64-bit processor.

anand@AnandFolio:/$ getconf LONG_BIT
64