- Windows App Store
- NOAA Users should use Software Center Windows Terminal
- Install from Github Releases
We will use the new Windows windows terminal app for the rest of the steps. If you chose not to install it. then you may use Windows Powershell Application. For WSL commands, have another PowerShell window logged into wsl using (wsl) command once you have wsl installed.
wsl --install
#verify you have wsl version 2
wsl -l -v
You should have Ubuntu at this point. But if not install it with next step. Else skip to next step
#install ubuntu
wsl.exe --install -d Ubuntu-22.04
#Setup a username and password for your WSL
Note: if Ubuntu was installed by default for you when you installed WSL, note that the default name for "distro" used for -d
flags in the tutorial will be Ubuntu
. If you installed it manually it will be Ubuntu-22.04
.
- (go to etc folder in WSL).
cd ~/../../etc
- Create wsl.conf file and add content to it with the following commands
echo "[network]" | sudo tee wsl.conf
echo "generateResolvConf = false" | sudo tee -a wsl.conf
- Delete resolve.conf from /etc
sudo rm -Rf /etc/resolv.conf
- In CMD Prompt Run
ipconfig /all | findstr /R "DNS\ Servers"
you should see output like so. Copy the (hopefully first) DNS from the output that belons to your vpn network adapter.If you are not sure then check windows network adapter properties for the right vpn connection and copy the dns server from there.
- Create resolv.conf and append the line
echo "nameserver <dns copied in last step>" | sudo tee -a resolv.conf
echo "nameserver 8.8.8.8" | sudo tee -a resolv.conf
At this point your /etc/resolv.conf should look like so
- Lock resolve.conf for future changes
sudo chattr +i resolv.conf
- Restart WSL in Powershell Admin Mode
wsl --terminate Ubuntu
wsl -d Ubuntu
- And finally in windows cmd, ps or terminal:
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000
- If upon updates you run into permission issues with WSL, restart WSL engine
Get-Service vmcompute | Restart-Service
- Download Docker Desktop from docker site
- Install it with default options
- Open Docker desktop settings and verify the following
- Click resources > WSL Integration
- Check "Enable integration with my default WESL distro"
- Check Ubuntu 22.04
-
Follow instructions on github docs here
-
All set! Build something awesome!