The Windows Subsystem for Linux is a compatibility layer that allows native Linux programs to be executed directly from the Windows command line. Specifically, the WSL allows 64-bit Linux binaries to be executed in the standard Executable and Linkable Format (ELF).
The Windows Subsystem for Linux is available starting with Windows 10. But Microsoft’s interest in making it easier for Windows users to work with Linux tools from their familiar desktop environment goes back further. For example, WSL emerged from the “Microsoft Windows Services for UNIX” (SFU/Interix) project, which in turn was a further development of the “POSIX subsystem” already integrated in Windows NT. With the Windows Subsystem for Linux 2 (WSL2) this development continues.
Before the release of WSL, users had to try to combine the best aspects of the Windows and Linux universes. In principle, there were two ways to make Linux programs run under Windows:
- Use of a virtual machine. A complete Linux installation is used as a virtual computer under Windows. The approach is user-friendly and allows the full use of any Linux applications, but requires some hardware resources. Furthermore, there is limited interchangeability between running programs on the two operating systems.
- Use of the Linux runtime environment Cygwin. This is installed under Windows and allows the use of many popular Linux programs. The exchange between Windows and Linux programs is possible with Cygwin, but to a limited extent.
Furthermore, users could set up Linux parallel to the existing Windows installation. However, this setup, known as dual boot, requires restarting the computer to switch to the respective operating system. An exchange between running programs from Windows and Linux is therefore not possible with this option.
The Windows Subsystem for Linux does not need a virtual machine and is therefore performant. However, there is no complete Linux Kernel on board, so not all applications are supported. In particular, the WSL alone does not allow the execution of Linux programs with a graphical user interface (GUI). Approaches exist for this as well, but they require additional steps for installation and configuration.