LBW: Linux Binaries on Windows

New! LBW version 0.1 released to the unsuspecting public!

What?

LBW is a Linux system call translator for Windows. It allows you to run unmodified Linux applications on top of Windows.

It is not virtualisation; only one operating system is running, which is Windows. It is not emulation; Linux applications run directly on the processor, resulting in (theoretically) full native performance.

Consider it as being like WINE, but in reverse.

Right now LBW is in a proof-of-concept stage. It's in no way suitable for doing real work on as it's full of bugs. On the other hand it's adequate for running a Debian chroot, downloading and installing packages with apt and dpkg, compiling and running programs with gcc, connecting to remote servers with ssh, and even running some basic X applications.

Everybody loves screenshots:

LBW in action

Right now LBW runs on 32-bit Windows XP only.

Danger!

LBW is evil. It is about fifteen different hacks all balanced precariously on top of each other. Lots of things in LBW don't work. Lots of things will never work.

It will crash.

Back up your data, keep your system secure, and above all else:

You have been warned.

Important links

The Frequently Asked Questions list

How to install Interix (which LBW needs)

A list of things that I would like help fixing

The mailing list (please join this if you use LBW!)

Where?

LBW is hosted on SourceForge.

SourceForge.net Logo

Both the source and a Windows installer package can be downloaded from the project download page.

Important! LBW requires Interix, so you'll need to install this first. Please see the installing Interix page for instructions.

How?

LBW works by running Linux code and intercepting the page faults that occur when the Linux code does something that Windows doesn't like --- such as making a system call into the Linux kernel.

When this happens it simply (ha!) looks at the registers, determines what system call the application is trying to make, does it, and returns to the application. The application thinks the Linux kernel did the work; instead it was LBW.

LBW relies on Interix to do the heavy lifting. Interix provides a Unix file system, process model, groups, users, pipes, sockets, etc. LBW's job therefore becomes vastly easier. Unfortunately, Interix is a rather old-school Unix, and Linux has a lot of functionality that Interix simply can't do; so we have to emulate it where possible, and fail where not.

Currently LBW implements, with varying degrees of success, 132 different system calls out of a total of about 350. That's enough to run a lot of programs, although I regularly come across new ones that need adding.

In addition, LBW contains an ELF binary loader for getting applications into memory in the first place, although luckily we can use Linux' own dynamic loader for dealing with shared libraries.

There's more to it than that, of course: Linux uses registers rather differently to Windows, so we have to do some really unpleasant things to make that work, which unfortunately are currently badly hurting performance; and the Interix chroot() isn't useful to us, so I have to implement my own VFS layer; etc.

Can you help? Are you an Interix guru? Do you know more about the Windows NT kernel than any sane person should? If so, check out the technical wishlist page for things that I could really use help on!

LBW is all my own work, and contains no Linux kernel code (apart from trivial lists of symbol names). It's written in C++ with a tiny bit of inline assembler.

What's new?

Version 0.1, 2010-04-01: First version released to an unsuspecting world. Many thanks to Jayson Smith for being the first guinea-pig to try this ever. He's a brave man and a lucky one.

Who?

LBW was written by David Given. The program is freely distributable under the terms of the MIT License.