Raspberry Pi OS 32-bit vs 64-bit¶
To check which Raspberry Pi OS package architecture you have, run dpkg --print-architecture on the Pi. arm64 means 64-bit ARM and armhf means 32-bit ARM. A 64-bit kernel can run 32-bit software, so check the package architecture before choosing an application download. Debian dpkg manual
Check whether Raspberry Pi OS is 32-bit or 64-bit¶
Run these in the Pi's normal terminal or over SSH. If you are checking which package goes into a container, run the checks inside that container.
dpkg --print-architecture |
getconf LONG_BIT |
Typical uname -m |
What to choose |
|---|---|---|---|
arm64 |
64 |
aarch64 |
The ARM64 build for your OS release |
armhf |
32 |
aarch64 |
The supported 32-bit ARM build, even though the kernel is 64-bit |
armhf |
32 |
armv7l or armv6l |
The supported 32-bit ARM build for your specific Pi model |
Use the first result for Debian packages. getconf LONG_BIT reflects the bitness of the program you ran on Raspberry Pi OS. uname -m normally describes the running kernel's machine type. If dpkg --print-foreign-architectures lists armhf on an arm64 installation, that lists an additional architecture the package manager is configured to handle. Debian architecture commands
On a Pi 4B running Trixie, the installed tools reported arm64, 64, and aarch64. On that same running kernel, temporarily extracted 32-bit versions of dpkg and getconf reported armhf and 32. This is why the kernel result alone cannot tell you which application package to download.
Compare an application package with your OS¶
For a downloaded Debian package, replace the example filename below with the actual package.
An arm64 package is built for 64-bit ARM. An amd64 package targets 64-bit x86 PCs. On armhf, choose the vendor's supported 32-bit build and check its minimum board or CPU requirements. For example, changing the boot option arm_64bit affects kernel selection. Installing a 64-bit OS image gives you the 64-bit userspace that an ARM64-only application expects. Raspberry Pi kernel boot options · Chrome ARM64 installation errors
Choose an image in Raspberry Pi Imager¶
- New Pi 4 or Pi 5 installation. Choose 64-bit Raspberry Pi OS unless your project has a specific 32-bit requirement. Choose Lite for a terminal-only system or Desktop if you need a GUI.
- Older Pi. Select the exact board in Imager and use its compatible image list. The original Pi Zero and the Zero 2 W have different CPU support.
- Working 32-bit project. Keep the working media while you try a 64-bit image on a spare card. Back up the data and settings, check application support, and verify your services on the new card before switching.
The OS release is a separate choice from bitness. Check the official image list for your board, then follow the first boot and login checks. Raspberry Pi OS images · First setup · Bookworm vs Trixie