Introduction
This article provides an overview of Windows Subsystem for Linux (WSL) 2 and explains how to enable the Virtual Machine Platform by default on Windows 11 after downloading Ubuntu from the Microsoft Store.
Prerequisites
Before proceeding, ensure that your system meets the following requirements:
- Windows 11 operating system
- Ubuntu downloaded from the Microsoft Store
Enabling WSL 2
Follow these steps to enable WSL 2:
- Open PowerShell as Administrator.
- Run the following command to enable the WSL optional feature: ``` wsl --install ```
- Restart your system.
- Open PowerShell as Administrator again and run the following command to set WSL 2 as the default version: ``` wsl --set-default-version 2 ```
Enabling Virtual Machine Platform
Follow these steps to enable the Virtual Machine Platform:
- Open the Windows Terminal.
- Run the following command to open the registry editor: ``` reg edit ```
- Navigate to the following path: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VirtualMachinePlatform ```
- If the VirtualMachinePlatform key does not exist, create it.
- Create a new DWORD value named "Enabled" and set its value to 1.
- Restart your system.
Troubleshooting
If you encounter any issues, refer to the following resources:
- Microsoft Documentation on Installing WSL on Windows 10
- Microsoft Documentation on WSL 2 Kernel
- How-to Geek: How to Install Ubuntu on Windows 10
tags), and an unordered list () for referencing troubleshooting resources. The HTML document does not use layout tags like or
.