Windows Subsystem for Linux

Our apps will typically be deployed on Linux machines. To streamline deployment, it is recommended that the apps are tested on Ubuntu before attempting to deploy them on an external machine via Azure Pipelines or Azure App Service. Fortunately, Microsoft has released a contanerized version of Linux, called the Windows Subsystem for Linux, which can be installed on Windows machines. The WSL is available for installation through the Microsoft Store, free of cost. Surprisingly enough, the majority of Linux computers in the world are actually deployed by Microsoft, so they have plenty of experience containerizing the Linux OS.

Mounted Drives

Access Windows filesystem from Linux

/mnt/c

Access Linux filesystem from Windows

\\wsl$\Ubuntu-18.04\

Add an SSH key for Azure DevOps

To clone repositories from Azure DevOps, you’ll need to create an SSH key with WSL2, and add the key to your DevOps account. Follow this tutorial.

Troubleshooting

If you’re having trouble pinging google.com from the WSL, try the following. Edit /etc/resolv.conf and add the following nameserver:

nameserver 1.1.1.1

Further Reading