- Installing WSL is simple: here are three methods that work for Windows 10 and 11.
- The Windows Subsystem for Linux is meant to attract software developers.
- Microsoft is making Windows the platform of choice for everything and everyone.
Windows and Linux are not two words you hear together in a sentence very often, at least not in a friendly manner. But, in past years Microsoft has tried and mostly succeeded to make Windows more appealing to Linux developers, the people who needed Linux for their work.
That was possible with the introduction of Windows Subsystem for Linux, short for WSL. What we’re dealing with is basically a virtual machine that runs Linux under Windows. Not content with this definition? Check Microsoft’s website for (a lot) more details on how this works.
Why would you install WSL instead of a virtual machine with your preferred Linux distro? Microsoft says performance is better, with less overhead. It’s also less complicated than a dual-boot setup. So basically WSL is the middle road between a Linux VM and a dual-boot system.
By default, WSL is not installed on Windows, but fortunately, it’s really easy to get going. I’ve found three ways to install WSL in Windows, all of them working under Windows 10 and Windows 11. Feel free to choose the one you prefer.
First, Install Virtual Machine Platform
One important requirement before you begin is that you need to activate the Virtual Machine Platform module on your computer. It’s an optional feature (we have a guide on installing those), but I’ve included this step in the first guide since you’ll install both Virtual Machine Platform and the Subsystem for Linux from the same place.
Don’t forget that the Virtual Machine Platform module is required for WSL, no matter how you’ll install it.
If you miss this step when you’ll try and launch WSL you’ll get the following message.
Add WSL as an Optional Feature
1. Open the Start menu and being typing to search for Optional features. The Settings app page will open.
2. Scroll down until you reach More Windows features at the bottom.
3. A new window will open. Scroll the list and check Virtual Machine Platform and Windows Subsystem for Linux. Hit OK to install them both.
4. A reboot will be required, so restart the computer, as instructed.
That’s almost it. WSL is now installed, but there’s an additional step required, which is installing the Linux distribution of choice. That’s done separately in two ways (not again?!).
Yes, there are two ways to install the required Linux distribution for WSL to actually work. One is from Command Prompt/PowerShell, one from the Microsoft Store. each method is included at the end of the next two guides.
Currently, there are 5 distributions that you can install for Windows Subsystem for Linux:
– Ubuntu (4 flavors)
– Kali Linux
Install WSL From the Command Prompt
Now, this is the geeky way of installing WSL. Still very easy to do:
1. Open the Start menu and type cmd. Don’t hit Enter, instead right-click on the first result, Command Prompt and select Run as administrator.
3. Run the following command to see available distros that can currently be installed.
wsl --list --online
4. Now type another command to actually install WSL, together with the desired Distro. If you don’t mention the distro or other options Ubuntu will be selected by default.
wsl --install -d DISTRO_NAME
Make sure you replace DISTRO_NAME with the actual name of the distribution you want to install. In my case I chose Ubuntu.
5. A reboot will be required to proceed. After the computer boots, this window will pop up.
You will need to provide a username and password after a short install period.
6. After this step you’ll be greeted with the Linux shell. Everything is fully functional now.
Recommended Method: Install WSL From the Windows Store
Lastly, I recommend you install the WSL module directly from the Windows store. First, because it’s super easy to do. Second, because it will run isolated from Windows, in a protected sandbox, and will be updated automatically just like any other app.
1. Open the Start menu and type Windows Store.
2. Search for Windows Subsystem for Linux and click on the Get button to install WSL as a system app.
3. Reboot if necessary, then reopen Windows Store.
4. Search for Ubuntu or any of the other distro you prefer. They should show up as apps. Click Get to install. Aaaand… you’re done.
When you want to start WSL you can do so by searching Windows Subsystem for Linux in the Start menu, or by typing wsl in the Command Prompt or PowerShell.
By default, Linux will launch in the Windows folder for the current user. If you’re familiar with Linux I’m sure you’ll get around just fine from here.
If you need to replace the installed distro you can uninstall it from the Add or remove programs section of the Settings app, then download a new one from the Windows store.
Completely removing WSL requires uninstalling both the distro and the Windows Subsystem for Linux items (there may be more than one, check thoroughly) in the Apps & features settings page.
If you’ve installed WSL as an optional feature you won’t find it here. Follow the same steps from the first guide and uncheck the corresponding options.
I hope this guide is easy to follow, as I intended. In case you still have questions let me know in the comments and all try to sort things out for you.