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

Manage Windows 10 Network Adapter Priority

The ‘Adapters and Bindings’ Tab in Windows 10 is no longer available as shown in [How to change network connection priority in Windows 10].

Here’s a workaround so that the network adapter priority can be controlled. In my case I wanted to use Wifi for network connectivity while also connecting to a wired router.

[reference]

1. Goto Control Panel > Network and Internet > Network Connections

2. Right click the desired connection (Higher Priority Connection)

3. Click Properties > Internet Protocol Version 4

4. Click Properties > Advanced

5. Uncheck 'Automatic Metric'

6. Enter 10 in 'Interface Metric'

7. Click OK