WSL2 – Windows Subsystem for Linux Installation Guide for Windows 10

Old: [Windows Subsystem for Linux Installation Guide for Windows 10]

WSL2: [Download the Linux kernel update package]

PS C:\WINDOWS\system32> wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         2

[VS Code: Developing in WSL]

Open a WSL terminal in VS Code by opening Terminal->New Terminal and enter wsl in the terminal.

[Configure WSL for C/C++ Debugging]

Enable libc debugging in VS Code.

sudo mkdir /build
sudo mkdir /build/glibc-ZN95T4
sudo cd /build/glibc-ZN95T4
sudo tar xvf /usr/src/glibc/glibc-2.31.tar.xz