Microsoft has released improvements to its Windows Subsystem for Linux 2 (WSL) in a Windows 10 preview build, with features benefiting newcomers and developers alike.
As part of the update, WSL2 can now perform GPU compute functions, including using Nvidia’s CUDA technology. The new additions deliver on the promises Microsoft made at May’s Build 2020 conference, where the company also teased graphical user interface support for the Windows Subsystem for Linux. We’re still waiting on those capabilities.
WSL’s improvements are part of Windows 10 Build 20150, part of the Dev Channel of Insider builds. Formerly known as the Fast Ring, the Dev Channel is devoted to testing new features which aren’t necessarily tied to any upcoming Windows 10 feature release.
Simplifying the installation process
As the name suggests, the Windows Subsystem for Linux 2 allows users to run a Linux kernel from within Windows. WSL2 doesn’t perform quite as well as a full-fledged Linux distribution running natively on the hardware, but it’s close.
WSL2 isn’t natively integrated into Windows, either. It’s an optional feature that users can choose to enable using the “Turn Windows features on and off” Control Panel within Windows 10, which will then download the necessary files and ask to reboot the PC.
One of Build 20150’s new features tries to simplify that further. By typing wsl.exe —install as a command, Windows will take care of all of the configuration. It’s not entirely clear whether that command can be run from the Command Line app, or if it requires the PowerShell interface.
According to a blog post authored by Windows program manager Craig Loewen, Microsoft plans to support automatic installation of a Linux distribution within WSL as well sometime in the future.
Similarly, users can type in wsl.exe —update to update the Linux kernel, wsl.exe —update —status to check the status of the kernel, and wsl.exe —update —rollback to roll back the kernel to a previous version. According to Loewen, the Linux kernel updates will actually be managed by Windows Update and automatically download to your PC. The commands are there, however, to provide fine-grained control over the process, he wrote.
GPU compute support, too
For those of who want to dive a bit deeper into Linux, Microsoft has now implemented GPU compute support, which has been supported in hardware (and Linux) for close to a decade. It’s a new feature for WSL2, however—remember, WSL2 is moving closer to offering all of the capabilities that a native Linux installation does, but it’s not there yet.
”This preview will initially support artificial intelligence (AI) and machine learning (ML) workflows, enabling professionals and students alike to run ML training workloads across the breadth of GPUs in the Windows ecosystem,” the company said in a blog post.
Specifically, Microsoft has partnered with Nvidia an initial preview of Nvidia’s CUDA for WSL2, including machine-learning support for ML tools, libraries, and popular frameworks, including PyTorch and TensorFlow. Microsoft is also providing a preview package of TensorFlow with a DirectML backend.
AMD also released a new graphics driver preview unlocking DirectX 12 compatible GPU-acceleration within the WSL for a wide range of its Radeon hardware.