WSL

WSL

Installation #

wsl --install

Fixing DNS #

From: https://superuser.com/questions/1191249/unable-to-resolve-host-name-in-wsl

Create a wsl.conf file in the root etc folder (you may need sudo):

sudo nano /etc/wsl.conf

Paste the following lines in the file and exit saving it (Ctrl+X):

[network]
generateResolvConf = false

Delete the symbolic link to the resolv.conf file:

cd /etc
sudo rm resolv.conf

Create a new resolv.conf file in /etc:

sudo nano resolv.conf

Paste the following content into it saving it with (Ctrl+O and Ctrl+X):

# This file was automatically generated by WSL. To stop automatic generation of this file, 
# add the following entry to /etc/wsl.conf:>
# [network]
# generateResolvConf = false
# nameserver 172.23.0.1
nameserver 8.8.8.8