How to Install WSL 2 on Windows 10 on ARM
This is just a quick blog post about the experience on running the Windows Subsystem for Linux 2 (WSL 2) on Windows 10 on ARM, which comes on devices like the Surface Pro X. Since I got many questions from developers and IT Pros about the Surface Pro X and how it can handle different workflows on Windows 10 on ARM, I decided to write a blog post, on how you can install WSL 2 on Windows 10 on ARM and the Surface Pro X.
You need a device that runs Windows 10 on ARM like the Surface Pro X. Yes, WSL 2 works on the Surface Pro X, and you can run Ubuntu 18.04, which comes as an ARM compiled distro. But you will need to install at Windows Insider build (19041 or higher, also known as Windows 10 20H1 or Windows 10 version 2004). And yes, if you are running an Intel or AMD based machine, you can also install and run WSL 2 on Windows 10.
To run Windows 10 Insider Builds, you can go to Settings, Update & Security, and the Windows Insider Program and join the program. If you get asked to choose the Ring, you will need to select the Insider Slow Ring. You will need to reboot your machine and check for updates, to install the Windows Insider builds.
- You can find more about the Windows Insider Program here.
- What’s new for Windows 10 Insider Preview Builds (20H1)
- Windows 10 on ARM
Install WSL 2 on Windows 10 on ARM
To install the Windows Subsystem for Linux 2 (WSL 2), you need to follow these tasks.
- Enable the Windows Subsystem for Linux Optional feature (WSL 1 and WSL 2)
- Install a distro for the Windows Subsystem for Linux
- Enable the ‘Virtual Machine Platform’ optional feature (WSL 2)
- Configure the distro to use WSL 2
Enable the Windows Subsystem for Linux and Virtual Machine Platform
You can enable the Windows Subsystem for Linux (WSL) and the Virtual Machine Platform feature in the Control Panel or with PowerShell.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
These commands will need a reboot of the machine.
Install a Linux distro for the Windows Subsystem for Linux
If you don’t already have installed a WSL distro, you can download and install it from the Windows 10 store. You can find more here: Crazy times – You can now run Linux on Windows 10 from the Windows Store.
If you want to run a full Ubuntu virtual machine on Windows 10 Hyper-V, you can check out my blog post.
Set WSL distro to use version 2
After you completed the first two steps, you will need to configure the distro to use WSL 2. Run the following command to list the available distros in PowerShell:
wsl -l -v
If this command doesn’t work with the -v parameter, you don’t have the right Windows 10 build installed.
To set a distro to WSL 2, you can run the following command:
wsl --set-version DistroName 2
You can also set WSL 2 as the default. You can also run the command before you start the Linux distro for the first time, which will give you faster setup speeds.
wsl --set-default-version 2
To find out more about installing WSL 2, check out the Microsoft Docs page.
After you have enabled WSL 2 you can see that WSL 1 was running kernel version 4.4.0.
WSL 2 is running Linux kernel version 4.19.84
You can also see, that this is an ARM version of Ubuntu.
I hope this helps you and gives you a quick overview on how you can install WSL 2 on Windows 10 on ARM and the Surface Pro X. If you have any questions, let me know in the comments and check out the WSL 2 FAQ. The Windows Subsystem for Linux 2 Kernel is also open-source, you can follow the project on GitHub.
By the way, you can now also start using Docker Desktop together with the Windows Subsystem for Linux 2 and even use WSL 2 on Windows Server.