Windows Subsystem for Linux
You can use WSL2 linked to VS Code to do node development (speeds up development since the Malware scanner does not run across the WSL2 virtual disk).
Follow the instructions here: https://docs.microsoft.com/en-us/windows/wsl/install And here: https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl
Quirks
Section titled “Quirks”Networks
Section titled “Networks”By default, networking won’t work (DNS resolution fails) so run the following command:
sudo chattr -i /etc/resolv.confsudo rm /etc/resolv.confsudo bash -c 'echo "nameserver 10.150.0.117" > /etc/resolv.conf'sudo bash -c 'echo "[network]" > /etc/wsl.conf'sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'sudo chattr -f +i /etc/resolv.conf
To use your Windows credentials to access Git repos in WLS2 run the following command (a newish version of Git Bash must be install in Windows):
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager-core.exe"
Typescript server crashing
Section titled “Typescript server crashing”If when you start VSCode the Typescript server crashes you might need to increase the ‘Max TS Server Memory’ in VSCode.
Azure CLI
Section titled “Azure CLI”If you need to access / log in to Azure, first install the Az CLI in Ubuntu: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-1-install-with-one-command
The use device code login to authenticate via the browser:
az login --use-device-code
I have had the best success logging into Azure with device codes using Firefox with Containers