Enabling WSL (Windows Subsystem for Linux) on Windows 11: A Step-by-Step Guide
Windows 11 now recognizes the wsl command, but it won't work until you enable it. This guide will walk you through the process of enabling and configuring WSL on your Windows 11 system.
Step 1: Avoid Unnecessary Steps
Before we begin, it's important to note that if you've already installed WSL on your Windows 11 system, you don't need to repeat the process. To check if WSL is already installed, open a command prompt and type the following command:
wsl --list --verboseIf WSL is already installed, you'll see a list of installed Linux distributions. If not, continue to the next step.
Step 2: Enable the Windows Subsystem for Linux
To enable WSL, follow these steps:
- Press the Windows key and search for "Turn Windows features on or off".
- Scroll down and check the box next to "Windows Subsystem for Linux".
- Click "OK" and restart your computer when prompted.
Step 3: Enable Virtual Machine Platform
WSL also requires the Virtual Machine Platform feature to be enabled. To do this, follow these steps:
- Press the Windows key and search for "Turn Windows features on or off".
- Scroll down and check the box next to "Virtual Machine Platform".
- Click "OK" and restart your computer when prompted.
Step 4: Set WSL 2 as the Default Version
WSL 2 is the latest version of WSL and offers improved performance and compatibility. To set WSL 2 as the default version, follow these steps:
- Open a command prompt as an administrator.
- Type the following command to set WSL 2 as the default version:
wsl --set-default-version 2Step 5: Install a Linux Distribution
Finally, you can install a Linux distribution from the Microsoft Store. Simply search for the distribution you want to install, such as Ubuntu, and click "Get" to download and install it.
Enabling WSL on Windows 11 involves enabling the Windows Subsystem for Linux and Virtual Machine Platform features, setting WSL 2 as the default version, and installing a Linux distribution from the Microsoft Store. By following these steps, you'll be able to run Linux applications alongside your Windows applications on your Windows 11 system.