Raspberry Pi OS is available in a 32-bit and 64-bit architecture. When installing applications, it is important to know whether the operating system is 32-bit or 64-bit. This tutorial shows how to check whether Raspberry Pi OS is 32-bit or 64-bit.
getconf is a command line tool that is used to retrieve system configuration information at runtime. Using the
getconf command with the
LONG_BIT option, prints the number of bits in a long integer data type on the system.
If the command outputs the
32, then OS is 32-bit and if it outputs the
64, then OS is 64-bit.
uname -m command can be used to determine if Linux kernel is 32-bit or 64-bit. A 32-bit OS can use a 32-bit or 64-bit kernel. After Linux kernel update to 6.1 on Raspberry Pi OS, the 64-bit Linux kernel is used by default, even on the 32-bit OS. In that case,
uname -m returning
aarch64 instead of