Skip to content

WSL2 manual installation

This page outlines the manual procedure for installing and configuring the Windows Subsystem for Linux (WSL) 2. The process involves enabling system features, installing updates via the command line, and setting the default WSL version.

Installation Steps

The installation is typically performed through the Windows Command Prompt or PowerShell with administrative privileges.

1. Enable the Windows Subsystem for Linux

The first step requires enabling the "Microsoft-Windows-Subsystem-Linux" optional feature.^[wsl.md#L17-18]

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

2. Enable Virtual Machine Platform

WSL 2 requires the "Virtual Machine Platform" feature to be enabled.^[wsl.md#L23-24]

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

3. Install the Linux Kernel Update Package

A specific kernel update package must be downloaded and installed to support WSL 2. For x64 computers, the file is named wsl_update_x64.msi.^[wsl.md#L26-28]

4. Set WSL 2 as Default

After restarting the machine to apply the feature changes, the default WSL version should be set to 2.^[wsl.md#L30-31]

wsl --set-default-version 2
  • [[Windows Subsystem for Linux]]
  • [[Docker]]

Sources

  • wsl.md