Debian-based systems (Ubuntu, Linux Mint, Kali, etc.) often support installing software built for different CPU architectures through multiarch capabilities. The dpkg package manager plays a key role in handling and reporting architecture information in such environments. This allows a system to install and manage software from different architectures, and run foreign binaries when hardware compatibility or emulation support is available. This tutorial explains how to check host and foreign architectures using dpkg.
The following command displays the host (native) architecture of the system:
dpkg --print-architecture
Example output:
amd64
This value represents the primary architecture for which the system is configured and is used by default when installing packages.
In multiarch-enabled setups, additional architectures may also be configured to allow installation of foreign binaries. These can be listed using the following command:
dpkg --print-foreign-architectures
Example output:
i386
This indicates that support for 32-bit packages has been enabled alongside the native 64-bit packages.
It is important to note that when no foreign architectures are configured, this command produces no output. The absence of output in such cases confirms that the system is operating without additional architecture support.
Leave a Comment
Cancel reply