This page looks best with JavaScript enabled

How to install WSL2 on Windows 10

 ·  ☕ 1 min read

The Windows Subsystem for Linux (WSL) let you run a GNU/Linux environment, including most command-line tools, utilities, and applications, directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.

  1. Enable WSL:

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

    Note: the following command should be executed in Powershell as Administrator.

  2. Enable Virtual Machine feature:

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

    Note: the following command should be executed in Powershell as Administrator.

  3. Set WSL2 as default WSL version:

    wsl --set-default-version 2
    
  4. Install distro of your choice from Microsoft Store. For example, Ubuntu.

  5. Optionally, install Windows Terminal.

What's on this Page