The Windows Subsystem for Linux lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
WSL 2 is a new version of the Windows Subsystem for Linux architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. Its primary goals are to increase file system performance, as well as adding full system call compatibility. This new architecture changes how these Linux binaries interact with Windows and your computer's hardware, but still provides the same user experience as in WSL 1 (the current widely available version).
Individual Linux distributions can be run with either the WSL 1 or WSL 2 architecture. Each distribution can be upgraded or downgraded at any time and you can run WSL 1 and WSL 2 distributions side by side. WSL 2 uses an entirely new architecture that benefits from running a real Linux kernel.
When you install WSL, it performs the following actions:
- Enables the Windows Subsystem for Linux and Virtual Machine Platform optional features
- Downloads and installs the latest Linux kernel
- Sets WSL 2 as the default
- Downloads and installs Ubuntu distribution (reboot may be required) by default.
- Windows Subsystem for Linux Documentation
- What is Windows Subsystem for Linux
- Comparing WSL 1 and WSL 2
- FAQ's about Windows Subsystem for Linux 2
- Install WSL on Windows 10 and Windows 11
You must be signed in as an administrator to install WSL.
EXAMPLE: WSL (Linux) in Windows 11 File Explorer
Open Windows Terminal (Admin), and select Command Prompt.
Copy and paste the
wsl --installcommand into the elevated terminal, and press . (see screenshot below step 3)
WSL will install the Ubuntu distribution by default using the
wsl --install command. If you would prefer to have WSL install a different Linux distribution by default, then use one of the following commands below instead for the distribution you want:
wsl --install -d Debian
wsl --install -d kali-linux
wsl --install -d openSUSE-42
wsl --install -d SLES-12
To see a list of available Linux distributions, enter the
wsl --list --online command.
If you already installed WSL, this command will fail to run.
You will have to manually install any Linux distributions you want as usual.
When installing WSL has finished, restart the computer to apply.
When the computer has finished restarting and you sign back in to Windows 11, WSL will automatically resume after a moment to install the Linux distribution (ex: Ubuntu). (see screenshot below)
When the Ubuntu distribution has finished installing, you will then need to create a user account and password for your new Linux distribution (ex: Ubuntu).