How to install Linux distros in Windows 10's WSL 2
Microsoft has been showing Linux a lot of love in recent years, and nowhere is this more visible than in Windows Subsystem for Linux in Windows 10.
A new update to WSL makes it easier than ever to install Linux distros such as Ubuntu, Debian and Kali Linux. At the moment, automatic distro installation using the
wsl --install command is only available to Windows Insiders, but it will make its way to everyone soon.
- Microsoft releases Windows 10 Build 20246, and removes a number of big features
- Sun Valley: Microsoft is planning a major redesign for Windows 10
- Microsoft releases KB4577586 update to remove and block Flash from Windows
The updated wsl --install command can currently be found in Windows 10 Build 20246. The latest version of the command not only installs the all-important compatibility layer, but also your distro of choice. Microsoft explains: "With automatic distro installation, you can now have a full WSL install on your machine in a matter of minutes just by running one command:
By default, when you run this command, you will end up with Ubuntu installed. While this will suit many -- perhaps most -- people, Ubuntu is not everyone's first choice of distro. Thankfully, other distros are available through the use of additional parameters.
For instance, running the command
wsl --install -d Debian will install Debian. Other currently supported distros are various LTS variants of Ubuntu, Kali Linux, openSUSE, and SUSE Linux Enterprise Server. This list is likely to expand over time, and you can see the most up to date list of supported distros, along with the parameters needed to install each, by running the command
wsl --list –online.