In case you hadn’t heard, Microsoft loves Linux. This statement has its skeptics, but with the introduction of Windows Subsystem for Linux (WSL), it’s becoming increasingly credible. WSL allows you to run a full Linux environment with a Linux kernel inside Windows, with tight integration between the two. The first version of WSL lacked a kernel and didn’t perform as well. Despite being a virtual machine at heart, WSL has deep ties to its Windows host.
For developers, WSL provides seamless access to both Windows and Linux without the need for traditional virtual machines. However, you don’t have to be a developer to benefit from it. WSL is a solid tool for anyone, whether you’re experienced or just starting with Linux. Microsoft has made significant strides in the onboarding experience, making WSL easier than ever to set up. Here’s how you can do it.
What You Need to Run WSL on Windows
You don’t need a high-powered PC or the “Pro” version of Windows to run WSL. Although it utilizes the Hyper-V architecture, you don’t need to pay extra for it. WSL supports both x64 and ARM processors. If you’re using an ARM-based machine, you’ll need a Linux version that has an ARM release, such as Ubuntu.
WSL can also run on Windows inside a virtual machine, provided the VM software supports nested virtualization and it is enabled.
How to Install WSL on Windows
The installation process for WSL is now straightforward, getting you up and running in minutes. The only prerequisite is that you’re on Windows 10 version 2004 or above (with the KB5004296 patch applied).
There are two options to install WSL: through the Microsoft Store or PowerShell.
Using the Microsoft Store:
- Open the Microsoft Store.
- Download the “Windows Subsystem for Linux Preview” application.
Using PowerShell:
- Open PowerShell on your PC.
- Enter the following command:shell
wsl --install
- Wait for the process to complete and reboot your PC when prompted.
WSL will now be set up on your PC. The default distribution is Ubuntu, but you can use any others available in the Microsoft Store or from third-party sources such as GitHub or directly from distribution makers.
For Windows 11 users, the Windows Terminal app comes pre-installed and is the best way to use WSL on your PC. You can launch a distro through PowerShell using the command wsl -d
followed by the distro name. With Windows Terminal, you can access each installed distro from a dropdown menu.
If you don’t have Windows Terminal installed, you can download it from the Microsoft Store or through the Windows Package Manager.