This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
For simplicity, we generally recommend using thewsl --install to install Windows Subsystem for Linux, but if you're running an older build of Windows, or Windows Server Core, that may not be supported. We have included the manual installation steps below. If you run into an issue during the install process, check theinstallation section of the troubleshooting guide.
You must first enable the "Windows Subsystem for Linux" optional feature before installing any Linux distributions on Windows.
Open PowerShellas Administrator (Start menu > PowerShell > right-click > Run as Administrator) and enter this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartWe recommend now moving on toStep 2 - Check requirements for running WSL 2, updating to WSL 2, but if you wish to only install WSL 1, you can nowrestart your machine and move on toStep 6 - Install your Linux distribution of choice. To update to WSL 2,wait to restart your machine and move on to the next step.
To update to WSL 2, you must be running Windows 10...
or Windows 11.
Note
Builds lower than 18362 do not support WSL 2. Use theWindows Update Assistant to update your version of Windows. The Windows version 1903 support is also only for x64 systems. If you are using an Arm64 version of Windows, you will need to upgrade to Windows 10 version 2004 or later for full access to WSL 2. For more info, seeWSL 2 support coming to Windows 10 Versions 1903 and 1909.
To check your version and build number, selectWindows logo key + R, typewinver, selectOK.Update to the latest Windows version in the Settings menu.
Note
If you are running Windows 10 version 1903 or 1909, open "Settings" from your Windows menu, navigate to "Update & Security" and select "Check for Updates". Your Build number must be 18362.1049+ or 18363.1049+, with the minor build # over .1049. Read more:WSL 2 Support is coming to Windows 10 Versions 1903 and 1909.
Before installing WSL 2, you must enable theVirtual Machine Platform optional feature. Your machine will requirevirtualization capabilities to use this feature.
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartRestart your machine to complete the WSL install and update to WSL 2.
The Linux kernel update package installs the most recent version of theWSL 2 Linux kernel for running WSL inside the Windows operating system image. (To runWSL from the Microsoft Store, with more frequently pushed updates, usewsl.exe --install orwsl.exe --update.).
Download the latest package:
Note
If you don't know your system architecture, press theWin + X keys, find System in the menu, or press theY key to open the "About System" settings (or Control Panel) interface, and find the architecture of your current system.
Run the update package downloaded in the previous step. (Double-click to run - you will be prompted for elevated permissions, select ‘yes’ to approve this installation.)
Once the installation is complete, move on to the next step - setting WSL 2 as your default version when installing new Linux distributions. (Skip this step if you want your new Linux installs to be set to WSL 1).
Note
For more information, read the articlechanges to updating the WSL2 Linux kernel, available on theWindows Command Line Blog.
Open PowerShell and run this command to set WSL 2 as the default version when installing a new Linux distribution:
wsl --set-default-version 2Open theMicrosoft Store and select your favorite Linux distribution.

The following links will open the Microsoft store page for each distribution:
*Paid only indicates that it is paid in the Microsoft Store, but it does not mean that it has no other free download channels.
From the distribution's page, select "Get".

The first time you launch a newly installed Linux distribution, a console window will open and you'll be asked to wait for a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second.
You will then need tocreate a user account and password for your new Linux distribution.

CONGRATULATIONS! You've successfully installed and set up a Linux distribution that is completely integrated with your Windows operating system!
If you run into an issue during the install process, check theinstallation section of the troubleshooting guide.
There are some scenarios in which you may not be able (or want) to, install WSL Linux distributions using the Microsoft Store. You may be running a Windows Server or Long-Term Servicing (LTSC) desktop OS SKU that doesn't support Microsoft Store, or your corporate network policies and/or admins do not permit Microsoft Store usage in your environment. In these cases, while WSL itself is available, you may need to download Linux distributions directly.
If the Microsoft Store app is not available, you can download and manually install Linux distributions using these links:
This will cause the<distro>.appx packages to download to a folder of your choosing.
If you prefer, you can also download your preferred distribution(s) via the command line, you can use PowerShell with theInvoke-WebRequest cmdlet. For example, to download Ubuntu 20.04:
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsingTip
If the download is taking a long time, turn off the progress bar by setting$ProgressPreference = 'SilentlyContinue'
You also have the option to use thecurl command-line utility for downloading. To download Ubuntu 20.04 with curl:
curl.exe -LR -o ubuntu-2004.Appx https://aka.ms/wslubuntu2204In this example,curl.exe is executed (not justcurl) to ensure that, in PowerShell, the real curl executable is invoked, not the PowerShell curl alias forInvoke-WebRequest.
Note The following command won't work on Server Core installations
Once the distribution has been downloaded, navigate to the folder containing the download and run the following command in that directory, whereapp-name is the name of the Linux distribution .appx file.
Add-AppxPackage .\app_name.AppxOnce the Appx package has finished downloading, you can start running the new distribution by double-clicking the appx file. (The commandwsl -l will not show that the distribution is installed until this step is complete).
If you are using Windows server, or run into problems running the command above you can find the alternate install instructions on theWindows Server documentation page to install the.Appx file by changing it to a zip file.
Once your distribution is installed, follow the instructions tocreate a user account and password for your new Linux distribution.
Using Windows Terminal enables you to open multiple tabs or window panes to display and quickly switch between multiple Linux distributions or other command lines (PowerShell, Command Prompt, Azure CLI, etc). You can fully customize your terminal with unique color schemes, font styles, sizes, background images, and custom keyboard shortcuts.Learn more.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?