This is a guide on how to install Windows Subsystem for Linux (WSL) on your local Windows computer.
WSL allows Windows users to develop and run applications within a GNU/Linux environment. Previous to this feature release we needed Virtual Machines (VMs), and dual boot setups were much more common if you wanted local test environments.
The list of available Linux Distributions for installation, current as of this post date, includes the following:
– Ubuntu 20.04 (LTS / 18.04 LTS)
– openSUSE Leap 15.1
– SUSE Linux Enterprise Server (15 SP1 / 12 SP5)
– Kali Linux
– Debian GNU/Linux
– Fedora Remix for WSL
– Pengwin (+ Enterprise)
– Alpine WSL
– Raft (Free Trial)
For more information on this, have a look at the documentation – Microsoft Docs: What is Windows Subsystem for Linux?
This post here is a demo to help you install WSL for the first time on your Windows machine. FYI, there’s a reboot of your computer required at the end of the first step (enabling WSL).
First, we need to enable the optional WSL Windows Feature before we look at Linux Distributions.
To do this, open PowerShell (Run as Administrator):
Then run the following:
PowerShellEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You’ll then be prompted to restart your local computer.
You can find all the Linux Distributions on the Microsoft Store which are available to download from there. This may be restricted by Group Policy if you’re on a Domain (a work computer).
You can download and install Linux Distributions manually from this list on the Microsoft Documentation page.
In this post, we’re going for the simple option, via the Microsoft Store.
Select Apps within your search to filter your list, and find your desired Linux Distribution. We’re choosing Ubuntu 20.04 here:
When you click to open this, the WSL app will run and you will be prompted for a username and password for your Linux installation.
We are now in our Ubuntu 20.04 instance and can now test or develop in the Linux world, on Windows.
If we close this app down and open a PowerShell or Windows Terminal, we can enter this WSL Distribution by typing ‘wsl’:
That about wraps things up for now – we hope to expand on this more soon.