Foreign Binary Execution
In Ubuntu, the binfmt-support service provides an elegant mechanism for executing binary files compiled for different architectures. It leverages the Linux kernel’s binfmt_misc capability. For example, if you are on an x86_64 desktop, binfmt-support allows you to seamlessly run ARM binaries by automatically intercepting the execution request and passing the binary to an emulator like QEMU. It can also be used to automatically launch Windows .exe files with WINE, or Java .jar files with the JVM, just by typing the filename.
While this is incredibly useful for developers doing cross-compilation or testing multi-architecture Docker containers, it is completely unnecessary for a standard web server, database server, or a basic desktop where you only ever execute native binaries. Leaving it running consumes a tiny amount of memory and adds an infinitesimally small layer of complexity to binary execution. If you do not emulate foreign architectures, you can safely disable it.
How to Disable the Binfmt-Support Service
You can stop and disable the service using systemctl.
- Open your Ubuntu Terminal or connect via SSH.
- Stop the currently running service:
sudo systemctl stop binfmt-support.service
- Disable the service to prevent it from initializing on boot:
sudo systemctl disable binfmt-support.service
- (Optional) Mask the service to ensure no other package (like qemu-user-static) automatically starts it as a dependency:
sudo systemctl mask binfmt-support.service
The kernel will now rely solely on standard ELF binary execution, ignoring attempts to seamlessly translate foreign executables.