Windows Subsystem for Linux (WSL) is an excellent tool for developers and users looking to run a Linux environment within Windows 11. The Windows Subsystem for Linux (WSL) is a compatibility layer in Windows that allows users to run a Linux environment directly on a Windows PC.
Instead of using a traditional virtual machine, WSL integrates Linux with the Windows file system and allows for native execution of Linux software. This guide will walk you through the process of setting up WSL on your Windows 11 system.
Step 1: Enable Virtual Machine Platform and WSL
Before moving forward, we will enable the virtual machine platform and Windows Subsystem for Linux from the Windows features.
The Virtual Machine Platform in Windows 11 is like a special tool that lets your computer run a mini-computer inside it. This is super handy for people who want to use both Windows and Linux on the same computer. To use it, just make sure your computer has the right settings turned on, and then you can enable this tool in Windows.
Windows works just fine for most of us but if you are an IT pro, system admin, or developer, there might be some extra goodies you would want. Windows lets you switch these features on or off through the Control panel or a simple Start menu search.
-
- Click the Start button and type “Windows Features.”
- Select “Turn Windows features on or off.”
- Scroll down to find “Virtual Machine Platform” and “Windows Subsystem for Linux.” Check both Options.
- Click “OK” and restart your computer when prompted after the installation wizard has finished installing additional files for Linux.
Step 2: Install WSL2 Kernel Update Package
Now we will install the latest WSL kernel package. It will help in ensuring that all the supported distros run without any problem.
- Go to the official WSL2 kernel package page
- Then download the latest WSL2 Kernel Update Package from there. It is under 20 MB in size.
- Once it is downloaded, run the installer and the Linux kernel package will be installed in a couple of seconds.
Now move to the next step for updating WSL2 as the default version of the kernel package.
Step 3: Set WSL2 as Default Version
We installed the latest updated package in the last step and now let us set it as the default version. This will help run the update package for running the Linux operating system.
1. Launch PowerShell as an administrator from the Start menu search either through the right-click menu or the search result options.
2. Then type the following command and press ENTER.
wsl –set-default-version 2
3. Now wait for the command to run and then you will see a success message.
Getting Ready for Linux on Windows
You have successfully installed WSL on your Windows 11 system and can now access your Linux environment alongside your Windows environment. This powerful tool lets you install any of the supported Linux distros on your computer alongside Windows 11.