LinuxCommandLibrary

linux32

Run 32-bit programs on a 64-bit system

TLDR

View documentation for the original command

$ tldr setarch
copy

SYNOPSIS

linux32 command [arguments...]

DESCRIPTION

The linux32 command sets up a 32-bit execution environment on a 64-bit Linux system.
It accomplishes this by modifying the personality flag of the calling process to indicate a 32-bit environment.
This allows the execution of 32-bit binaries and libraries, which would otherwise not be compatible with the 64-bit architecture. linux32 is typically used to run older programs or libraries that have not been ported to 64-bit systems. It does this by manipulating the ABI which determines the calling conventions (argument passing, return values), data structure layout and other low-level details that determine how different program parts interact.
It is important to note that linux32 requires the necessary 32-bit libraries to be installed on the system in order to execute 32-bit applications successfully. The command is essentially a wrapper around the `setarch` command (often aliased to it). On some distributions it may be part of the `util-linux` package.

CAVEATS

Requires 32-bit libraries to be installed. May not work perfectly with all applications, especially those relying on very specific hardware or kernel features. It primarily affects the process's address space and calling conventions, allowing 32-bit binaries to be loaded and executed.

USAGE

Simply prefix the command you want to run with linux32. For example:
linux32 ./my32bitprogram
This will run 'my32bitprogram' in a 32-bit environment.

INSTALLATION

On most distributions, linux32 is typically part of the `util-linux` package. Install it using your distribution's package manager (e.g., `apt install util-linux` on Debian/Ubuntu, `yum install util-linux` on CentOS/RHEL).

HISTORY

linux32 evolved as a way to maintain compatibility with older 32-bit applications on newer 64-bit Linux systems. Its development was driven by the need to transition to 64-bit architectures while preserving access to existing software. It became a standard tool to allow 32 bit emulation on 64 bit systems.

SEE ALSO

setarch(1)

Copied to clipboard