Installing WSL2 (Windows Subsystem for Linux 2) on Windows 10 is pretty straightforward. First, you need to enable the WSL feature, then make sure virtualization is on. After that, you install WSL2, set it as the default version, and finally, install a Linux distro from the Microsoft Store.
How to Install WSL2 on Windows 10
This guide will help you install WSL2 on your Windows 10 system step-by-step, ensuring you can run a Linux environment without leaving your Windows OS.
Step 1: Enable WSL Feature
First, you need to enable the Windows Subsystem for Linux feature.
Open PowerShell as an administrator and type dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart.
This command enables the WSL feature but doesn’t restart your computer. You’ll need to restart manually after enabling it.
Step 2: Enable Virtual Machine Platform
Before installing WSL2, you must enable the Virtual Machine Platform feature.
In the same PowerShell window, type dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart.
Just like before, this command enables the necessary feature for WSL2 but doesn’t restart your computer. Again, you’ll need to restart manually.
Step 3: Restart Your Computer
You need to restart your computer to apply the changes.
Click on the Start menu, select the Power button, and then click on Restart.
Restarting your computer ensures that all the changes you made take effect.
Step 4: Download the WSL2 Kernel Update
Next, download the WSL2 Linux kernel update package from the Microsoft website.
Go to the Microsoft WSL2 kernel update page and download the installer. Run it to update your system with the latest WSL2 kernel.
Step 5: Set WSL2 as the Default Version
Set WSL2 as your default version of WSL.
In PowerShell, type wsl --set-default-version 2.
This sets WSL2 as the default for any new Linux distributions you install.
Step 6: Install a Linux Distribution
Finally, install a Linux distribution from the Microsoft Store.
Open the Microsoft Store, search for a Linux distribution like Ubuntu, and click Install. Once installed, launch it from the Start menu.
After completing these steps, you will have a fully functional Linux environment running alongside your Windows OS.
Tips for Installing WSL2 on Windows 10
- Check System Requirements: Ensure your Windows 10 version is 1903 or higher with Build 18362 or higher.
- Keep Software Updated: Always ensure you have the latest updates for Windows 10.
- Use PowerShell as Administrator: This ensures you have the required permissions to enable features.
- Enable Virtualization in BIOS: If virtualization isn’t enabled, WSL2 won’t work.
- Read Documentation: Microsoft’s official WSL documentation can be very helpful for troubleshooting.
Frequently Asked Questions
What is WSL2?
WSL2 is the second version of the Windows Subsystem for Linux, providing better performance and full system call compatibility.
Do I need to enable Hyper-V to use WSL2?
No, WSL2 uses the Virtual Machine Platform feature, not Hyper-V.
Can I switch back to WSL1 if needed?
Yes, you can set WSL1 as the default version by using the command wsl --set-default-version 1.
Is WSL2 available on all Windows versions?
WSL2 is available on Windows 10 version 1903 and higher with Build 18362 and above.
Can I run multiple Linux distributions?
Yes, you can install multiple Linux distributions and run them simultaneously.
Summary
- Enable WSL feature.
- Enable Virtual Machine Platform.
- Restart your computer.
- Download WSL2 kernel update.
- Set WSL2 as default.
- Install a Linux distribution.
Conclusion
And there you have it! You now know how to install WSL2 on Windows 10. This setup allows you to run a Linux environment side-by-side with your Windows OS, making it easier to develop and test applications across different platforms. If you run into any issues, don’t hesitate to refer to Microsoft’s official documentation or seek help from the community.
Installing WSL2 opens up numerous possibilities for developers, IT professionals, and hobbyists. It bridges the gap between Windows and Linux, providing the best of both worlds. So why wait? Dive in and start exploring the myriad of tools and applications available on Linux, all within the comfort of your Windows 10 machine. If you found this guide helpful, share it with others who might benefit from it, and keep experimenting!

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.