How to Enable WSL2 on Windows 10
If you want to run Linux on your Windows 10 machine without messing around too much, enabling the Windows Subsystem for Linux (WSL2) is your best bet. In a nutshell, WSL2 allows you to run a Linux kernel on your Windows machine. It’s perfect for developers or anyone who wants to use Linux tools without dual booting or using a virtual machine. Here’s a quick and easy guide to help you get WSL2 up and running in no time.
Step-by-Step Tutorial on How to Enable WSL2 on Windows 10
These steps will help you enable WSL2 on your Windows 10 computer, ensuring you can run Linux distributions side-by-side with your Windows apps.
Step 1: Open PowerShell as Administrator
Open the Start menu, type "PowerShell," right-click on Windows PowerShell, and select "Run as administrator."
Running PowerShell as an administrator is crucial because you’ll be making system-level changes. If you don’t have admin rights, you won’t be able to enable WSL2.
Step 2: Enable the WSL Feature
In the PowerShell window, type the command dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
and press Enter.
This command enables the Windows Subsystem for Linux feature on your system. You don’t need to restart your computer at this point, but that will be required later.
Step 3: Enable the Virtual Machine Platform Feature
Next, type dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
and press Enter.
The Virtual Machine Platform is a prerequisite for WSL2 as it leverages virtualization technology to run the Linux kernel. Again, no need to restart just yet.
Step 4: Restart Your Computer
Restart your computer to apply the changes.
This step is essential as it ensures that the newly enabled features are properly initialized. Make sure to save your work before restarting.
Step 5: Set WSL Version to WSL2
After restarting, open PowerShell as an administrator again, and type wsl --set-default-version 2
then press Enter.
This command sets WSL2 as your default version, so any new Linux distributions you install will use WSL2 automatically.
Step 6: Install a Linux Distribution from Microsoft Store
Open the Microsoft Store, search for your preferred Linux distribution (like Ubuntu), and click Install.
This step is where you choose the Linux flavor you want to run. Once installed, you can launch it from the Start menu like any other app.
After completing these steps, your Windows 10 machine will have WSL2 enabled. You can now run Linux distributions side-by-side with your Windows applications, providing a seamless development or user experience.
Tips for Enabling WSL2 on Windows 10
- Check System Requirements: Ensure your Windows version is 1903 or higher and build 18362 or higher.
- Keep PowerShell Open: You may need to run multiple commands, so keeping PowerShell open can save time.
- Virtualization Support: Make sure virtualization is enabled in your BIOS/UEFI settings.
- Disk Space: Ensure you have enough disk space for the Linux distributions you want to install.
- Update Windows: Keeping your system up-to-date can prevent compatibility issues.
Frequently Asked Questions
What is WSL2?
WSL2 stands for Windows Subsystem for Linux version 2, a compatibility layer for running Linux binary executables natively on Windows.
Is WSL2 better than WSL1?
Yes, WSL2 offers improved performance, full system call compatibility, and uses a real Linux kernel.
Can I run GUI applications with WSL2?
As of recent updates, you can run GUI applications using WSL2, especially with Windows 11 improvements.
Do I need to uninstall WSL1 to use WSL2?
No, you can upgrade your existing WSL1 distributions to WSL2 using the command wsl --set-version 2
.
Is WSL2 secure?
Yes, WSL2 is secure as it runs in a lightweight virtual machine managed by Windows.
Summary
- Open PowerShell as Administrator.
- Enable the WSL Feature.
- Enable the Virtual Machine Platform Feature.
- Restart Your Computer.
- Set WSL Version to WSL2.
- Install a Linux Distribution from Microsoft Store.
Conclusion
And there you have it! Enabling WSL2 on Windows 10 is a straightforward process that opens up a world of possibilities. Whether you’re a developer needing Linux tools or just curious about exploring different operating systems, WSL2 makes it easy and seamless. Plus, with our step-by-step guide and handy tips, you’ll have it up and running in no time.
WSL2 offers a truly integrated experience, allowing you to switch between Windows and Linux effortlessly. This is particularly useful for developers who need to test applications in both environments or use specific Linux tools. The compatibility and performance enhancements in WSL2 make it a valuable addition to any tech-savvy individual’s toolkit.
If you’re interested in more advanced configurations or troubleshooting tips, plenty of resources are available online. Microsoft’s official documentation is a great place to start, providing detailed guides and community forums where you can ask questions and share your experiences.
So, what are you waiting for? Go ahead and enable WSL2 on your Windows 10 machine and start exploring the best of both worlds today!
Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.