PSA: Check your RPi architecture

Raspberry Pis have historically been 32-bit, but more recently (as of 2020 or so) there’s been a 64-bit version of the Raspbian OS.

However, the first version was just a beta, and the officially supported OS was still 32-bit, with an option to enable 64-bit.

I recently found out that my RPi, instead of running 64-bit like I thought it was via uname -a displaying aarch64, is actually running a 64-bit kernel with a 32-bit userland! This means that applications like Docker, for example, will only be able to use 32-bit architectures and as a result (I believe) are slower than native 64-bit.

You can verify your userland arch by inspecting a basic tool, like ls:

file /bin/ls

If it says 32-bit but your uname says aarch64, you’re in a mix of architectures known as armhf. There’s no easy way of upgrading, and apparently the best way forward is to just reinstall the OS from scratch (whether you go with Raspbian or Debian or Ubuntu or other OS).

8 Likes