GPU Compute, WSL Install and WSL Update arrive in the latest Insider build for the Windows Subsystem for Linux
There are three thrilling new updates for the Windows Subsystem for Linux (WSL) in the new Windows Insider Preview Build 20150. The first is GPU compute: a feature that allows your Linux binaries to leverage your GPU, which makes it possible to do more machine learning/AI development and data science workflows directly in WSL. Secondly, we’ve added a new command:
wsl --install which allows you to install WSL with just one command. Lastly, we’ve added
wsl --update which gives you the ability to easily manage the Linux kernel version used by WSL 2 distros.
GPU compute support for the Windows Subsystem for Linux
We’re excited to announce that we’re addressing WSL’s #1 most requested feature by adding GPU compute support. This update will include support for NVIDIA CUDA, which will help enable professionals to use their local Windows machines for inner-loop development and experimentation. Additionally, this will also support DirectML, which will empower students and beginners to use hardware accelerated training on the breadth of Windows hardware, across AMD, Intel, and NVIDIA GPUs. For the full details on this announcement please read this blog post: GPU accelerated ML training inside the Windows Subsystem for Linux on the Windows Developer blog.
To get started with this feature, you’ll need to make sure you have this latest Insider preview build installed, have a WSL 2 distro installed, ensure your Linux kernel is up to date, and install the right drivers for your GPU. You can find the full instructions on the AI docs here!
We are working on making WSL easier to install, and we have added a new command line option to make that possible:
wsl.exe --install. You’ll only see this option on machines that do not have the ‘Windows Subsystem for Linux’ optional component enabled. In this initial release, this command will enable the Windows Subsystem for Linux optional component, as well as the Virtual Machine Platform optional component, and prompt you to restart your machine. In the future we plan to add support to automatically install WSL distros using this command as well. Stay tuned to this blog and the Windows Experience blog for updates on when those changes will be released to the Insider Fast ring. Additionally, WSL 2 distros will be the default type for any new installations of WSL. We made this change as the majority of users in the Insiders Fast ring are using WSL 2, you can read more about this on the WSL BUILD 2020 Summary blog post.
The Linux kernel that is used by WSL 2 distros is now being delivered via Microsoft Update. For almost all WSL users, this means your Linux kernel will be automatically kept up to date just like any other component on your machine and these updates are viewable inside of the ‘Windows Update’ page in your Windows Settings.
We also wanted to add command line options for those users who wish to have fine control over their Linux kernel versions inside of WSL.
wsl.exe --update and its options provide that control. Below is a description of the new commands that are available, and what each does.
wsl.exe --updateManage updates to the WSL 2 kernel. If no options are specified, this will update to the latest kernel version.
wsl.exe --update --statusView update status. This will show you what kernel version you are on, and when you were last updated.
wsl.exe --update --rollbackRevert to a previous version of the Linux kernel.
The rollback command exists to allow users to easily uninstall the latest update if needed. When any new Linux kernel version is installed, your last used kernel is stored as a rollback kernel. When you execute the above command WSL 2 will load using your rollback kernel (i.e: WSL 2 distros will now load using your previous kernel version). When a new update is available, your machine will automatically install the latest kernel version and WSL 2 will load using that latest version.
File your feedback and getting in touch with the team
We always love hearing your feedback about anything and everything WSL! For any technical issues, or feature requests please file them at the WSL Github Repo. For general questions you can find WSL team members on Twitter here on this Twitter list or you can ping me directly @craigaloewen. Let us know what you think of these new features, we’ll be looking forwards to giving you more updates in the future! 😊
Hi. Love this work. Thanks a bunch.
I have had one issue on my Surface Laptop 2. After installing the latest dev Windows 10 OS update (fast ring, just two days ago), my keyboard stopped working.
I had to downgrade. Did report an issue but posting here anyways…
thanks a lot Craig. this is valuable information. Keep up the good work. essential oils