The Windows Subsystem for Linux allows you to download and install Linux and run command-line tools (and soon full-fledged desktop apps) on a Windows 10 computer. But installing a Linux distro using WSL has been a kind of tricky, multi-step process… until now.
Earlier this year Microsoft announced it was working on an update that would let you install the Windows Subsystem for Linux simply by typing
wsl --install into a command prompt. Now that feature is here… sort of.
Microsoft released Windows 10 Insider Preview Build 20246 today, and along with a bunch of bug fixes, it brings support for the new
wsl --install command.
In a nutshell, all you have to do to install the Windows Subsystem for Linux is open a command prompt, PowerShell, or Windows Terminal window, type
wsl --install and hit enter. It’ll install all the necessary components and then download and install Ubuntu by default.
If you’d rather install a different Linux distribution, you have other choices. Just add a little extra info to the command before you hit enter so that it reads
wsl --install -d <DistroName> where <DistroName> is the name of the OS you want to install. Here’s the list of options available so far:
So, for example, if you want to install Ubuntu 20.04, you’d type
wsl --install -d Ubuntu-20.04 and then hit enter. .
If you don’t feel like downloading a pre-release version of Windows 10, you can always wait for the feature to make its way to a stable release in the coming months. But you can still install Windows Subsystem for Linux the old-fashioned way:
- Open the “Turn Windows features on or off” tool.
- Scroll down until you find Windows Subsystem for Linux.
- Check the box and then click OK.
- Reboot your computer
- Open the Windows Store and search for the Linux distro you want to install and click the “get” button to install it.
Optionally you can also upgrade from Windows Subsystem for Linux version 1 to WSL 2 for improved performance, but that involves taking several additional steps.