Install Windows Subsystem for Linux (WSL)

Sancar Yildirim
May 17, 2021

--

Install Windows Subsystem for Linux (WSL)

Before We Start

Before we install WSL, if you want to get some information about WSL you can check this brief story.

WSL Installation

1. Open “PowerShell” as Administrator:

Open “PowerShell” as Administrator

2. Enable WSL 1

Type the following command:

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

Enable WSL 1 from PowerShell

3. Enable WSL 2

Type the following command:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enable WSL 2 from PowerShell

4. Restart Your Computer

You can restart with the following command:

Restart-Computer

5. Download WSL 2

Install the WSL 2 from Microsoft according to your device:

  • x86_64 for Intel and AMD devices
  • arm64 for Snapdragon and other ARM devices

6. Set WSL Default Version to 2

Open PowerShell as Administrator:

wsl.exe --set-default-version 2

Set WSL 2 as Default from PowerShell

That’s it :)

--

--