Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Excuse the somewhat basic and probably general question: I've heard/read somewhere that on Windows you can run a 32 bit executable on a 64 bit machine and vice-versa; but cannot do this on Linux/UNIX. Hoping an expert can provide some details/reasons or some good reference (links) on this?

share|improve this question
4  
On both Linux and Windows, you can run 32-bit programs on a 64-bit OS, but not vice/versa. Generally because it's much easier to emulate the "lesser" platform on the newer vs. the other way around. –  Joe Apr 19 '11 at 3:01
add comment

migrated from stackoverflow.com Apr 19 '11 at 4:46

This question came from our site for professional and enthusiast programmers.

4 Answers

You can do it on both.

The amd64/x64 CPU architecture can execute 32-bit instructions, so that's not a problem. And both the Windows and Linux kernels can handle a 32-bit process. What it usually comes down to is shared libraries. A 32-bit program needs to use 32-bit shared libraries. If the 32-bit version of the libraries it needs aren't installed, the runtime dynamic link will fail and the program will not run for lack of the library.

Microsoft ships with 32-bit versions of pretty much all necessary libraries since they really want 32-bit stuff to run (heck -- some of their own programs still only ship as 32-bit binaries!). In Linux you have to make sure you've installed packages like ia32-libs to have 32-bit versions of common shared libraries.

That said, on both 64-bit systems there certainly could be individual 32-bit programs that don't run because they depend on some more obscure shared library that doesn't ship with the OS.

share|improve this answer
add comment

You can do it in both, but whether a particular program can work will depend on the availability of libraries.

Both Linux and Windows have shared libraries (Windows calls them DLLs) which are architecture-specific. You can't load a 64-bit library into a 32-bit process and vice versa.

Both sets of libraries are usually available, and are held in different directories so that the loader doesn't get them mixed up (Linux distributions typically place 64-bit libraries in /usr/lib64 or /lib64)

share|improve this answer
add comment

You can not run 64bit apps on a 32bit operating system as far as I know...

However both Windows & Linux 64bit may run 32bit apps.

share|improve this answer
add comment

You'll likely need to install 32-bit compatibility libraries in order to run 32-bit applications on Linux. Of course what you need to install varies from distribution to distributions. With Ubuntu you would use these terminal commands:

apt-get update
apt-get install ia32-libs
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.