Windows Subsystem for Linux (WSL) is a component of
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
that allows the use of a
GNU/Linux environment from within Windows, foregoing the overhead of a
virtual machine
In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
and being an alternative to
dual booting. The WSL
command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
tool is installed by default in Windows 11, but a distribution must be downloaded and installed through it before use. In Windows 10, WSL can be installed either by joining the
Windows Insider program or manually via
Microsoft Store
The Microsoft Store (formerly known as the Windows Store) is a digital distribution platform operated by Microsoft. It was created as an app store for Windows 8 as the primary means of distributing Universal Windows Platform apps. With ...
or
Winget.
The original version, WSL 1, differs significantly from the second major version, WSL 2. WSL 1 (released August 2, 2016), acted as a
compatibility layer
In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With s ...
for running Linux
binary executables (in
ELF
An elf (: elves) is a type of humanoid supernatural being in Germanic peoples, Germanic folklore. Elves appear especially in Norse mythology, North Germanic mythology, being mentioned in the Icelandic ''Poetic Edda'' and the ''Prose Edda'' ...
format) by implementing Linux
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s in the
Windows kernel. WSL 2 (announced May 2019
), introduced a real
Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
a managed virtual machine (via
Hyper-V
Hyper-V is a native hypervisor developed by Microsoft; it can create virtual machines on x86-64 systems running Windows. It is included in Pro and Enterprise editions of Windows (since Windows 8) as an optional feature to be manually enabled. A ...
) that implements the full Linux kernel. As a result, WSL 2 is compatible with more Linux binaries as not all system calls were implemented in WSL 1.
Microsoft offers WSL for a variety of reasons. Microsoft envisions WSL as "a tool for developers – especially web developers and those who work on or with open source projects".
Microsoft also claims that "WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine" (a common alternative for using Linux in Windows), while also allowing the use of both Windows and Linux tools on the same set of files.
The majority of WSL was released as open source software on May 19, 2025, although certain filesystem functions still rely on a
proprietary library that is not open source at this time.
History
Microsoft's first foray into achieving Unix-like compatibility on Windows was the
Microsoft POSIX Subsystem, superseded by
Windows Services for UNIX via
MKS/
Interix, which was eventually deprecated with the release of
Windows 8.1. The technology behind Windows Subsystem for Linux originated in the unreleased
Project Astoria, which enabled some
Android applications to run on
Windows 10 Mobile
Windows 10 Mobile is the fourth and final generation of Microsoft's Windows Phone mobile operating system, succeeding Windows Phone 8.1. First released in 2015, it was marketed by Microsoft as being an Windows 10 editions, edition of its Per ...
.
It was first made available in
Windows 10 Insider Preview build 14316.
Whereas Microsoft's previous projects and the third-party
Cygwin
Cygwin ( ) is a free and open-source Unix-like environment and command-line interface (CLI) for Microsoft Windows. The project also provides a software repository containing open-source packages. Cygwin allows source code for Unix-like operati ...
had focused on creating their own unique
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
environments based on the
POSIX standard, WSL aimed for native Linux compatibility. Instead of wrapping non-native functionality into
Win32
The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s as Cygwin did, WSL's initial design (WSL 1) leveraged the
NT kernel executive to serve Linux programs as special, isolated minimal
processes (known as ''"pico processes"'') attached to
kernel mode
In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).
Computer ...
''"pico providers"'' as dedicated system call and
exception handlers distinct from that of a vanilla NT process, opting to reutilize existing NT implementations wherever possible.
WSL beta was introduced in Windows 10 version 1607 (Anniversary Update) on August 2, 2016. Only
Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
(with
Bash as the default shell) was supported. WSL beta was also called "Bash on Ubuntu on Windows" or "Bash on Windows". WSL was no longer beta in Windows 10 version 1709 (Fall Creators Update), released on October 17, 2017. Multiple Linux distributions could be installed and were available for install in the
Windows Store
The Microsoft Store (formerly known as the Windows Store) is a digital distribution platform operated by Microsoft. It was created as an app store for Windows 8 as the primary means of distributing Universal Windows Platform apps. With ...
.
Though the initial design of WSL was faster and more popular than the previous UNIX-on-Windows projects, Windows kernel engineers found difficulty in trying to increase WSL's performance and
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
compatibility by trying to reshape the existing NT kernel to recognize and operate correctly on
Linux's API. At a Microsoft Ignite conference in 2018, Microsoft engineers gave a high-level overview of a new "lightweight"
Hyper-V
Hyper-V is a native hypervisor developed by Microsoft; it can create virtual machines on x86-64 systems running Windows. It is included in Pro and Enterprise editions of Windows (since Windows 8) as an optional feature to be manually enabled. A ...
VM technology for
containerization
Containerization is a system of intermodal freight transport using intermodal containers (also called shipping containers, or International Organization for Standardization, ISO containers). Containerization, also referred as container stuf ...
where a virtualized kernel could make direct use of NT primitives on the host. In 2019, Microsoft announced a completely redesigned WSL architecture (WSL 2) using this lightweight VM technology hosting actual (customized) Linux kernel images, claiming to provide full syscall compatibility.
Microsoft announced WSL 2 on May 6, 2019,
and it was shipped with Windows 10 version 2004.
It was also backported to Windows 10 version 1903 and 1909.
GPU support for WSL 2 to run GPU-accelerated
machine learning
Machine learning (ML) is a field of study in artificial intelligence concerned with the development and study of Computational statistics, statistical algorithms that can learn from data and generalise to unseen data, and thus perform Task ( ...
was introduced in Windows build 20150. GUI support for WSL 2 to run Linux applications with
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
s (GUIs) was introduced in Windows build 21364.
Both are shipped in Windows 11.
In April 2021, Microsoft released a Windows 10 test build that also includes the ability to run Linux graphical user interface (GUI) apps using WSL 2 and
CBL-Mariner.
[ The Windows Subsystem for Linux GUI (WSLg) was officially released at the Microsoft Build 2021 conference. It is included in Windows 10 Insider build 21364 or later.]
On October 11, 2021, Microsoft introduced a version of WSL in the Microsoft Store
The Microsoft Store (formerly known as the Windows Store) is a digital distribution platform operated by Microsoft. It was created as an app store for Windows 8 as the primary means of distributing Universal Windows Platform apps. With ...
for Windows 11. It reached version 1.0.0 in November 2022 with added support for Windows 10.
In November 2024, Microsoft announced new features coming to WSL intended to improve the experience for new users, including a window with new "getting started" navigation tips and explanations.
On May 19, 2025, during Build, Microsoft announced that the majority of WSL had been released as open source software, aside from a driver used by WSL 1, and the IFS network redirector drivers on WSL 2.
Notable releases
Features
Bash running on Windows 10
The first release of WSL provides a Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
-compatible kernel interface developed by Microsoft, containing no Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
code, which can then run the user space
A modern computer operating system usually uses virtual memory to provide separate address spaces or regions of a single address space, called user space and kernel space. This separation primarily provides memory protection and hardware prote ...
of a Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
on top of it, such as Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed primarily of free and open-source software. Developed by the British company Canonical (company), Canonical and a community of contributors under a Meritocracy, meritocratic gover ...
, openSUSE
openSUSE () is a free and open-source software, free and open-source Linux distribution developed by the openSUSE project. It is offered in two main variations: ''Tumbleweed'', an upstream rolling release distribution, and ''Leap'', a stable r ...
, SUSE Linux Enterprise Server
SUSE Linux Enterprise (SLE) is a Linux-based operating system developed by SUSE. It is available in two editions, suffixed with Server (SLES) for servers and mainframes, and Desktop (SLED) for workstations and desktop computers.
Its major ve ...
, Debian
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
and Kali Linux
Kali Linux is a Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security. The software is based on the Debian''Testing'' branch: most packages Kali uses are imported from the De ...
. Such a user space might contain a GNU Bash
In computing, Bash (short for "''Bourne Again SHell''") is an interactive command interpreter and command programming language developed for UNIX-like operating systems. Created in 1989 by Brian Fox for the GNU Project, it is supported by the Fre ...
shell and command language, with native GNU command-line tools ( sed, awk, etc.), programming-language interpreters (Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
, Python, etc.), and even graphical applications (using an X11 server at the host side).
The architecture was redesigned in WSL 2, with a Linux kernel running in a lightweight virtual machine
In computing, a virtual machine (VM) is the virtualization or emulator, emulation of a computer system. Virtual machines are based on computer architectures and provide the functionality of a physical computer. Their implementations may involve ...
environment.
wsl.exe
The wsl.exe
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
accesses and manages Linux distributions in WSL via command-line interface
A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
(CLI) for example via Command Prompt
A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternativ ...
or PowerShell
PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
. With no arguments it enters the default distribution shell
Shell may refer to:
Architecture and design
* Shell (structure), a thin structure
** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses
Science Biology
* Seashell, a hard outer layer of a marine ani ...
. It can list available distributions, set a default distribution, and uninstall distributions. It can also run a Linux command replacing lxrun.exe
which is deprecated as of Windows 10 1803 and later.
WSLg
Windows Subsystem for Linux GUI (WSLg) is built with the purpose of enabling support for running graphical X11 and Wayland applications on Windows in a fully integrated desktop experience. WSLg was officially released at the Microsoft Build 2021 conference and is included in Windows 10 Insider build 21364 or later. However, with the introduction of Windows 11
Windows 11 is a version of Microsoft's Windows NT operating system, released on October 5, 2021, as the successor to Windows 10 (2015). It is available as a free upgrade for devices running Windows 10 that meet the #System requirements, Windo ...
, WSLg is finally shipping with a production build of Windows, bringing support for both graphics and audio in WSL apps. FreeRDP is used to encode all communications going from the Remote Desktop Protocol
Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft Corporation which provides a user with a graphical interface to connect to another computer over a network connection. The user employs RDP client software for this pu ...
(RDP) Server (in Weston) to the RDP Client ( msrdc on Windows) according to the RDP protocol specifications.
Prerequisites for running WSLg include:
* Windows 11 or Windows 10 Insider Preview builds 21362–21390.
* A system with virtual GPU (vGPU) enabled for WSL is recommended, as it will allow benefits from hardware accelerated OpenGL rendering.
Design
WSL 1
for Linux running on WSL">Firefox for Linux running on WSL
LXSS Manager Service is the service in charge of interacting with the subsystem (through the '' drivers'' and ), and the way that Bash.exe (not to be confused with the Shells provided by the Linux distributions) launches the processes, as well as handling the Linux system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s and the binary locks during their execution. All processes invoked by a particular user go into a so called "Linux Instance" (usually the first invoked process is init
In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down. It is the direc ...
). Once all the applications are closed, the instance is closed.
WSL 1's design featured no hardware emulation / virtualization (unlike other projects such as coLinux) and made direct use of the host file system (through and ) and some parts of the hardware, such as the network, which guarantees interoperability. Web servers for example, can be accessed through the same interfaces and IP addresses configured on the host, and shares the same restrictions on the use of ports that require administrative permissions, or ports already occupied by other applications. There are certain locations (such as system folders) and configurations whose access/modification is restricted, even when running as root, with sudo
() is a shell (computing), shell command (computing), command on Unix-like operating systems that enables a user to run a program with the security privileges of another user, by default the superuser. It originally stood for "superuser do", a ...
from the shell. An instance with elevated privileges must be launched in order to get "sudo" to give administrator privileges, and allow such access.
WSL 1 is not capable of running all Linux software, such as 32-bit binaries, or those that require specific Linux kernel services not implemented in WSL. Due to a total lack of Linux in WSL 1, kernel modules, such as device drivers, cannot be run. WSL 2, however, makes use of live virtualized Linux kernel instances. It is possible to run some graphical (GUI) applications (such as Mozilla Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curren ...
) by installing an X11 server within the Windows (host) environment (such as VcXsrv or Xming), although not without caveats, such as the lack of audio support (though this can be remedied by installing PulseAudio in Windows in a similar manner to X11) or hardware acceleration (resulting in poor graphics performance). Support for OpenCL
OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
and CUDA
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
is also not being implemented currently, although planned for future releases. Microsoft stated WSL was designed for the development of applications, and not for desktop computer
A desktop computer, often abbreviated as desktop, is a personal computer designed for regular use at a stationary location on or near a desk (as opposed to a portable computer) due to its size and power requirements. The most common configuratio ...
s or production servers, recommending the use of virtual machines (Hyper-V
Hyper-V is a native hypervisor developed by Microsoft; it can create virtual machines on x86-64 systems running Windows. It is included in Pro and Enterprise editions of Windows (since Windows 8) as an optional feature to be manually enabled. A ...
), Kubernetes
Kubernetes (), also known as K8s is an open-source software, open-source OS-level virtualization, container orchestration (computing), orchestration system for automating software deployment, scaling, and management. Originally designed by Googl ...
, and Azure for those purposes.
In benchmarks, WSL 1's performance is often near native Linux Ubuntu, Debian, Intel Clear Linux or other Linux distributions. I/O is in some tests a bottleneck
Bottleneck may refer to:
* the narrowed portion (neck) of a bottle
Science and technology
* Bottleneck (engineering), where the performance of an entire system is limited by a single component
* Bottleneck (network), in a communication network
* ...
for WSL. The redesigned WSL 2 backend is claimed by Microsoft to offer twenty-fold increases in speed on certain operations compared to that of WSL 1. In June 2020, a benchmark with 173 tests on WSL 2 (20H2) with an AMD Ryzen Threadripper 3970X showed an average of 87% of the performance of native Ubuntu 20.04 LTS. In contrast, WSL 1 had only 70% of the performance of native Ubuntu. WSL 2 improves I/O performance, providing a near-native level.
A comparison of 69 tests with an Intel Core i9-10900K in May 2020 resulted in nearly the same relative performance. In December 2020, a benchmark with 43 tests on WSL 2 (20H2) with an AMD Ryzen 9 5900X displayed an average of 93% of the performance of native 20.04.1 LTS, compared to WSL 1 which only achieved 73%.
WSL 2
running on WSL">Synaptic package manager running on WSL
Version 2 introduces changes in the architecture. Microsoft has opted for virtualization through a highly optimized subset of Hyper-V features, in order to run the kernel and distributions (based upon the kernel), promising performance equivalent to WSL 1. For backward compatibility
In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with Input ...
, developers do not need to change anything in their published distributions. WSL 2 settings can be tweaked by the ''WSL global configuration'', contained in an INI file named .wslconfig
in the User Profile folder.
The distribution installation resides inside an ext4
ext4 (fourth extended filesystem) is a journaling file system for Linux, developed as the successor to ext3.
ext4 was initially a series of backward-compatible extensions to ext3, many of them originally developed by Cluster File Systems for ...
-formatted filesystem inside a virtual disk, and the host file system is transparently accessible through the 9P protocol, similarly to other virtual machine technologies like QEMU
The Quick Emulator (QEMU) is a free and open-source emulator that uses dynamic binary translation to emulate a computer's processor; that is, it translates the emulated binary codes to an equivalent binary format which is executed by the mach ...
. For the users, Microsoft promised up to 20 times the read/write performance of WSL 1. From Windows an IFS network redirector is provided for Linux guest file access using the UNC path prefix of \\wsl$
.
WSL 2 requires Windows 11, or Windows 10 version 1903 or higher, with Build 18362 or higher, for x64 systems, and Version 2004 or higher, with Build 19041 or higher, for ARM64 systems.[
WSL 2 on Windows 11 retains 95% of the performance of native Ubuntu 20.04 LTS.
WSL 1 and WSL 2 both support IPv6 connections. IPv6 support in WSL 2 requires Windows 11 or newer.
]
Reception and criticism
In 2017 Richard Stallman
Richard Matthew Stallman ( ; born March 16, 1953), also known by his initials, rms, is an American free software movement activist and programmer. He campaigns for software to be distributed in such a manner that its users have the freedom to ...
expressed concerns that integrating GNU functionality into Windows would hinder the development of free software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
, calling efforts like WSL "a step backward in the campaign for freedom."
In 2021, Jim Salter writing for ''Ars Technica
''Ars Technica'' is a website covering news and opinions in technology, science, politics, and society, created by Ken Fisher and Jon Stokes in 1998. It publishes news, reviews, and guides on issues such as computer hardware and software, sci ...
'' called WSL "the best part of Windows 11," noting the ability to run applications with graphics and sound and install multiple distributions side-by-side.
WSL has most widely been described as a tool used and useful for developers, and not generally as being recommended for end users. Reviewers criticized some limitations, noting that it is not the same as having Linux and that it suffers from some performance limitations, including slow disk I/O.[
]
See also
* Azure Sphere
Azure Sphere is an application platform with integrated communications and security features developed and managed by Microsoft for Internet Connected Devices.
The platform consists of integrated hardware built around a silicon chip: the Azure ...
*
*
* Windows Terminal
Windows Terminal is a Tabbed, multi-tabbed terminal emulator developed by Microsoft for Windows 10 and later as a replacement for Windows Console. It can run any command-line app in a separate tab. It is preconfigured to run Windows Command Pro ...
* Xenix
Xenix is a discontinued Unix operating system for various microcomputer platforms, licensed by Microsoft from AT&T Corporation. The first version was released in 1980, and Xenix was the most common Unix variant during the mid- to late-1980s. T ...
References
Further reading
*
*
*
External links
WSL
on Microsoft Learn
*
*
*
{{Windows commands
2016 software
Compatibility layers
Microsoft free software
Software using the MIT license
Virtualization software
Windows 10
Windows 11
Windows components