Boost Your Development Speed: A Complete Guide to Installing and Using WSL 2 on Windows
Microsoft’s Build conference introduced Windows Terminal and WSL 2, and this guide walks you through installing WSL 2 on Windows 10 (Build 18917+), enabling required features, setting the default version, and even compiling the WSL 2 kernel, highlighting performance gains like 20× faster tar extraction.
Microsoft announced Windows Terminal and WSL 2 at the Build conference, offering developers a Linux‑like experience on Windows.
File‑system performance is improved and full system‑call compatibility is provided.
WSL 2 can run more Linux applications such as Docker, and supports commands like git clone, npm install, apt update, apt upgrade.
Microsoft states that extracting tar files in WSL 2 is up to 20× faster than WSL 1, and typical workflows with git clone, npm install or cmake see 2–5× speed gains.
Recent updates pushed WSL 2 back onto GitHub’s trending list, prompting this step‑by‑step installation guide.
Installing WSL 2
WSL 2 requires Windows 10 version Build 18917 or later. Enable “Windows Virtual Machine Platform” and “Windows Subsystem for Linux” in the “Turn Windows features on or off” dialog, then restart.
Install a Linux distribution from the Microsoft Store.
Run the following command in PowerShell to set the version for the installed distro: wsl --set-version <Distro> 2 Replace <Distro> with the name of the Linux distribution you installed.
To make WSL 2 the default for all new installations, execute:
wsl --set-default-version 2Compiling the WSL 2 Kernel
Microsoft provides a three‑step process on GitHub:
Install the latest Ubuntu distribution from the Microsoft Store.
Open the Ubuntu subsystem and install kernel build dependencies:
sudo install build-essential flex bison libssl-dev libelf-devCompile the kernel: make KCONFIG_CONFIG=Microsoft/config-wsl The source and build instructions are available at:
https://github.com/microsoft/WSL2-Linux-Kernel
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
