Clone WSL Distro: Installing Ubuntu WSL2 on Windows 11
This article will guide you through the process of installing Ubuntu WSL2 on Windows 11, following the canonical guide. The installation process involves enabling the Windows Subsystem for Linux (WSL) and Virtual Machine Platform (VMP) optional features, setting WSL 2 as the default version, and installing a new Ubuntu distribution.
Prerequisites
Before proceeding with the installation, make sure your Windows 11 system meets the following prerequisites:
- 64-bit Windows 11 Pro, Enterprise, or Education edition
- Minimum 4GB of RAM
- Minimum 1GB of free disk space
Step 1: Enable WSL and VMP Optional Features
Press Win + X and select Windows Terminal (Admin) to open a command prompt with administrative privileges. Run the following commands to enable the WSL and VMP optional features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Step 2: Set WSL 2 as the Default Version
To set WSL 2 as the default version, run the following command:
wsl --set-default-version 2
Step 3: Install a New Ubuntu Distribution
Open the Microsoft Store and search for Ubuntu. Click Get to download and install the Ubuntu distribution. Once the installation is complete, launch the Ubuntu application from the Start menu.
The first launch will take some time as it sets up the new distribution. When prompted, enter your username and password. These will be your credentials for logging in to the Ubuntu WSL2 environment.
Step 4: Verify the Installation
To verify that Ubuntu WSL2 is installed and working correctly, run the following command in the Ubuntu terminal:
uname -a
The output should indicate that the system is running a Linux kernel, such as:
Linux ubuntu 5.10.16.3-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
In this article, we have covered the process of installing Ubuntu WSL2 on Windows 11. By following the steps outlined above, you can now run a full Ubuntu environment on your Windows 11 system, taking advantage of the performance and compatibility benefits offered by WSL 2.