Skip to content
TrySitePrice

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

Best/Tutorial

There are several ways to determine if a Linux system is 32-bit or 64-bit.

  1. One way is to use the uname command with the -m option, which will print the machine hardware name of the system. If the output is "i686" or "i386", the system is 32-bit. If the output is "x86_64", the system is 64-bit.

uname -m

  1. Another way is to use the getconf command with the LONG_BIT option, which will print the number of bits used by the system's word size. If the output is "32", the system is 32-bit. If the output is "64", the system is 64-bit.

getconf LONG_BIT

  1. You can also use the lscpu command, which shows information about the CPU architecture and related information. In the output, look for the "Architecture:" field. If it says "x86_64", the system is 64-bit. If it says "i686" or "i386", the system is 32-bit.

lscpu

  1. Another method is to use file command on the binary /bin/ls or /bin/bash and check the output, if it contains x86-64, it's 64 bit and if it contains i386, it's 32 bit

file /bin/ls

In most modern systems, 64-bit will be the architecture, however, some older systems and embedded systems may still be using 32-bit architecture.