You can check your Debian architecture with a single terminal command: run dpkg --print-architecture for the package architecture your system installs software for, or uname -m for the kernel and CPU hardware architecture. The first is usually what you need when downloading a .deb package, adding an APT repository, or choosing an ISO; the second confirms what the hardware actually is. On a normal 64-bit Debian system, both report the same thing (amd64 and x86_64 respectively, which mean the same platform under different naming conventions). The confusion starts when they don't match, or when you're on a 32-bit userland running under a 64-bit kernel, and distinguishing those cases is the whole point of this guide.
This walks through the commands in the order you'd actually use them, explains why Debian and the kernel name architectures differently, and covers the cases—ARM boards, mixed 32/64-bit installs, foreign architectures for cross-installing packages—where the naive answer is wrong.
Why "Debian architecture" isn't one single answer
Before running anything, understand that "architecture" refers to at least three related but distinct things:
The Debian architecture name (what APT and dpkg use): amd64, arm64, i386, armhf, armel, ppc64el, riscv64, s390x, and so on. This is a naming scheme Debian defines for its package set, and it controls which binaries and repositories apply to you. The kernel machine name (uname -m): x86_64, aarch64, i686, armv7l, ppc64le, riscv64. This comes from the running kernel and reflects the hardware it booted on. The CPU hardware architecture: what the processor itself supports, which can include capabilities the OS isn't currently using (for example, a 64-bit CPU running a 32-bit install).
Debian's package architecture is the one that matters for 90 percent of tasks—installing packages, fetching ISOs, writing sources.list entries. But knowing the kernel and hardware layers is how you diagnose odd results. The Debian names and kernel names diverge on purpose, so a table helps here.
| Debian architecture | Typical uname -m | Common hardware |
|---|---|---|
| amd64 | x86_64 | 64-bit Intel/AMD PCs |
| i386 | i686 | 32-bit x86 PCs |
| arm64 | aarch64 | 64-bit ARM (Raspberry Pi 4/5 with 64-bit OS, servers) |
| armhf | armv7l | 32-bit ARM with hardware floating point |
| armel | armv5tel/armv7l | Older ARM without hardware FP |
| ppc64el | ppc64le | 64-bit little-endian POWER |
| riscv64 | riscv64 | 64-bit RISC-V |
| s390x | s390x | IBM Z mainframes |
That mapping is stable enough to rely on, though the kernel string can vary slightly by board and kernel build.
The prerequisites and a quick first check
You need a shell on the Debian system—local terminal, SSH session, or a virtual console. None of the commands below require root; all are read-only queries. If you're on a minimal install, dpkg and uname are part of the base system, so they're present even if you've installed nothing else.
The fastest single check:
Expected output on a typical modern PC install: amd64. If that prints, you're done for package-selection purposes. If it fails or you want corroboration, continue to the next sections.
A success check you can apply immediately: the output should be a single well-known Debian architecture token, not an error message, not empty, and not something like amd64 on hardware you know is a Raspberry Pi (which would be a red flag about which system you're actually logged into—more on that later).
Running dpkg --print-architecture for the package architecture
This is the authoritative answer for "which architecture does my Debian install install packages for." It reads dpkg's configured host architecture, which is set at install time and doesn't change just because the kernel supports more.
Steps:
1: Open a terminal. 2: Run dpkg --print-architecture. 3: Read the single line of output.
Expect exactly one token such as amd64, arm64, or i386. If you see amd64, your Debian system treats itself as 64-bit x86.
To check something more specific—whether a given architecture is supported for installation—use:
This lists architectures you've explicitly added beyond the host, typically for multiarch cross-installing (for example, installing i386 libraries on an amd64 system to run 32-bit software). Empty output means none added, which is the normal case. If you see i386 listed on an amd64 machine, that tells you someone enabled 32-bit package support—useful when debugging why a package resolves unexpectedly.
There's also dpkg-architecture, part of the dpkg-dev package, which prints a full set of variables:
Among the output you'll find DEB_HOST_ARCH=amd64, DEB_BUILD_ARCH=amd64, and related host/build/target triplets. If dpkg-dev isn't installed, the command will be missing—that's expected on minimal systems and not a problem, since dpkg --print-architecture needs nothing extra.
Reading uname -m for the kernel and CPU
The kernel's view comes from:
On a standard 64-bit Debian PC this prints x86_64. On a 64-bit ARM board it prints aarch64. On a 32-bit ARM system it typically prints armv7l. These are the kernel's machine names, not Debian's, and they're what you'll see quoted in hardware documentation, CPU datasheets, and container image tags.
For a fuller picture, uname -a prints kernel name, hostname, kernel release, and the machine name together. That's handy when you're not sure what you're looking at—for instance, confirming you're on the kernel version and hardware you think you are. And on x86 specifically, uname -m printing x86_64 while dpkg --print-architecture prints i386 is a real, legitimate configuration: a 64-bit kernel with a 32-bit Debian userland. It shows up on older installs, some embedded systems, and people who deliberately want a small 32-bit install.
When those two disagree, trust dpkg --print-architecture for anything package-related. Trust uname -m when you're asking what the hardware can do—for example, whether you could move to a 64-bit install.
Cross-checking with /proc/cpuinfo, APT, and the OS release
A few more read-only checks can corroborate the picture, and each is useful in a different situation.
/proc/cpuinfo shows per-core details. Run cat /proc/cpuinfo (or grep -m1 'model name' /proc/cpuinfo on x86). On x86 it lists flags, where the presence of lm (long mode) indicates 64-bit capability. On ARM, look at the Features line and the CPU architecture entry—CPU architecture: 8 on a modern ARM system points at ARMv8, which pairs with a 64-bit or 32-bit OS depending on the install. A CPU advertising 64-bit capability while the OS is 32-bit is a strong signal that a reinstall or migration could unlock more.
apt and dpkg package listings can confirm what's installed:
The apt-config line echoes the architecture APT uses, which should match dpkg. If they differ, something is misconfigured—rare, but a real cause of package-resolution weirdness.
/etc/os-release confirms you're on Debian and which release:
You'll see ID=debian and VERSION_CODENAME such as bookworm or trixie. Version matters: architecture names are stable, but the set of architectures Debian officially supports shifts over releases—older releases carried i386 as a first-class architecture, while newer ones (from Debian 13 "trixie" onward) treat it as a legacy/partial architecture. So if you're deciding whether to download for a given architecture, also confirm Debian's current support status for that architecture on your release rather than assuming anything. Check for the authoritative list; that page changes over time, so verify it at the moment you need it rather than trusting a remembered list.
A quick sanity check that ties these together: if /etc/os-release says debian, dpkg --print-architecture returns a valid token, and uname -m is consistent with it under the earlier table, your reading is solid.
Checking hardware capability when the OS is 32-bit
This is the case that trips people up most: a machine that can run 64-bit Debian but currently runs a 32-bit install. The commands above will honestly report i386 (Debian) and possibly i686 (kernel), and someone might conclude the hardware is 32-bit-only. It may not be.
On x86, check for the lm flag:
If it prints lm, the CPU supports long mode—64-bit—regardless of the 32-bit OS. On ARM, look for aarch64 support in the CPU model and kernel capability; lscpu is a convenient summary tool on both:
lscpu lists Architecture: (e.g., x86_64), CPU op-mode(s): (e.g., 32-bit, 64-bit), and on ARM the Model name and Vendor. The op-mode(s) line is the tell on x86: 32-bit, 64-bit means the CPU can do both even if your install is 32-bit.
This distinction has a practical consequence. If you're about to download software and the vendor offers only 64-bit builds, a 32-bit (i386) Debian install can't run them without a 64-bit userland, though on x86 it can often run 32-bit builds via multiarch. The right move is to install the 32-bit package, not to grab the 64-bit one and hope. If the software only exists for 64-bit, a reinstall or migration is the supported route, and that's a decision to make deliberately rather than a quick fix.
ARM boards, containers, and the "wrong architecture" trap
ARM systems (Raspberry Pi and similar single-board computers) are where kernel names and Debian names diverge most visibly. A 64-bit Raspberry Pi running 64-bit Debian reports aarch64 from uname -m and arm64 from dpkg. A 32-bit install on the same board reports armv7l and armhf. Both come from the same physical board, which is why you must check the running system rather than the hardware model.
Containers introduce a specific trap. Inside a Docker container on an amd64 host, uname -m reflects the host kernel (x86_64), while the container's userland and dpkg --print-architecture reflect the container image (amd64 normally, or arm64 if you're emulating an ARM image). If you're troubleshooting a failed package install inside a container, trust the container's dpkg --print-architecture, not the host's kernel name. When an image was built for a different architecture and run under emulation, package operations may still work but be slow or subtly incompatible—the architecture check is how you confirm what you're actually running.
Another trap: SSH into the "wrong" machine. Verifying hostnames with hostname and architecture together is a cheap way to catch a fat-fingered SSH target. If you expected arm64 and got amd64, you're on a different system than you thought.
Foreign architectures and multiarch, briefly
If your goal in checking architecture is to install packages built for another architecture, you'll need multiarch. Adding an architecture is a system change, so treat these as deliberate steps rather than part of a simple inspection:
1: Check the current foreign list: dpkg --print-foreign-architectures. 2: To add one (example, i386 on amd64): dpkg --add-architecture i386. 3: Refresh package lists: apt update. 4: Confirm with dpkg --print-foreign-architectures again.
Expect the added architecture to appear. The success check is that apt install package:i386 resolves afterward. Don't add architectures speculatively—each one increases index-maintenance work and can complicate dependency resolution. If you only wanted to know the architecture, stop before this section's steps.
If a command fails: common symptoms and reversible checks
dpkg: command not found on a Debian system almost always means you're not on the system you think—perhaps a different distro, a non-Debian container base image, or a restricted shell. Check /etc/os-release to confirm what you're actually running before proceeding.
uname failing is rare and usually indicates a broken or heavily restricted environment; on a normal Debian install it's a base utility. If it errors, verify you have a working shell at all with echo $0 and ls /.
Empty output from dpkg --print-architecture is abnormal on a standard install. Re-run it outside any wrapper script and check the exit code with echo $? immediately after; nonzero codes point to the problem. If dpkg is genuinely broken, treat that as a system-integrity issue rather than an architecture question.
Contradictory outputs—uname -m says x86_64 while dpkg says i386—are legitimate, as covered earlier, and nothing needs fixing. Contradictions within a layer (for example, apt-config and dpkg disagreeing) suggest misconfiguration worth investigating with apt update output, which often names the problem.
A reasonable stop condition: if you're seeing persistent errors from apt, dpkg, or your package database beyond read-only queries—especially if a repair involves removing packages or modifying sources—that's the point to consult a qualified Debian/Ubuntu administrator or a distribution support channel rather than experimenting on a production system.
A worked example: picking the right download
Suppose you want a vendor's 64-bit Linux tarball and need to know if your Debian box qualifies. You run the checks in order:
All three agree: a 64-bit x86 system with 64-bit capability. Download the x86_64/amd64 build. If instead uname -m returned x86_64 but dpkg --print-architecture returned i386, you'd have a 64-bit kernel with a 32-bit userland—download the i386 build, not the x86_64 one, unless you've deliberately migrated. And if you were on a Pi reporting arm64 from dpkg, you'd download the aarch64/arm64 build and ignore any x86_64 package. The arithmetic here is simple but the baseline matters: always compare the download's architecture label against dpkg --print-architecture, using the earlier table to translate kernel-style names.
That's the whole method. Run one command for the package answer, one for the kernel answer, cross-check with /proc/cpuinfo or lscpu when they disagree, and remember that the Debian package architecture—not the kernel string—is what governs installation.