Over the years Microsoft’s feelings towards the open source community have changed significantly. Contrast it to the Steve Ballmer days, when he described it as a cancer, to more recently when Azure runs a majority of Linux distros, submits code to the Linux kernel and is a platinum member of the Linux Foundation.
Microsoft also releases some key parts of its technology stack as open source. .NET Core is a version of its .NET programming stack that runs and compiles on multiple platforms. PowerShell also has a native Linux version and the replacement for the terminal emulator, cmd.exe, is developed on GitHub. Historical integrations between Windows and other operating systems have included Windows Services for Unix and support for mapping NFS shares.
To explore deeper into this we’ll be discussing Windows Subsystem for Linux (WSL), how to run command line and GUI Linux tools from within Windows, before looking at how to use PowerShell on the Linux platform.
WSL was first released in 2016 and its functionality and performance has been greatly enhanced in the years since. WSL1 was essentially a software translation layer, which covered the instructions from the Linux distribution and converted them to ones that are compatible with the Windows installation, like but in reverse. Unfortunately, performance wasn’t amazing, especially with disk IO, and when WSL2 was released it was re-architected to utilise a real Linux kernel, running in a Hyper-V VM to provide the means of system call translation. Windows files can be accessed from the Linuxdirectory structure and from Windows, Linux files can be accessed using the network share, which utilises the 9P protocol to provide the file-sharing capabilities.