Windows Server 2019 Core and WSL 2 Ubuntu 18.04
The Windows Subsystem for Linux (WSL) gives you the most command-line tools, utilities, and applications directly on Windows. I’m using Microsoft Windows Admin Center and Windows Server Core 20H2 with Build version 19042.746 to deploy WSL 2 with Ubuntu 18.04 Linux Distro. Here you find the installation of the Windows Server Core 20H2 with Windows Admin Center
In the following steps we will install the Following :
- Windows Subsystem for Linux (WSL)
- Move from WSL 1.0 to WSL 2.0
- Install Ubuntu 18.04 Linux distro
Installing Windows Subsystem for Linux (WSL)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
This will install the WSL Feature.
When it ask do you want to Restart select No, because we will install the Next Feature :
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
Select now Yes for Restarting the Server.
Moving from WSL 1.0 to WSL version 2.0
Before we Move from WSL version 1 to WSL version 2, we need a WSL Kernel Update.
Download here https://aka.ms/wsl2kernel
I Created a Share on the Windows Server via WIndows Admin Center.
And Uploaded the WSL_Update_X64.msi
Run WSL_Update_X64 and Click on Next.
Click on Finish
WSL –Set-Default-Version 2
Now we have Windows Subsystem for Linux version 2 Active.
Install Ubuntu 18.04 Linux Distro for WSL2
With the following Powershell Invoke-WebRequest we get Ubuntu 18.04
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu1804.zip -UseBasicParsing
md C:\Distros\Ubuntu1804
Expand-Archive ~/Ubuntu1804.zip C:\Distros\Ubuntu1804
Run Ubuntu 18.04
Ubuntu 18.04 is Running in WSL2 on Windows Server Core 20H2 😉
Conclusion
First of All Microsoft Windows Admin Center is supporting me in the Installation of Windows Subsystem for Linux. We have WSL 2 Running with Ubuntu 18.04 with a lot of possibilities!
What I really like is integration, like in Windows 10 and Docker for desktop with the WSL 2 Engine. Here my Blogpost
Together with VSCode Remote WSL is Cool.
Would be awesome to run Docker Windows and Linux Containers in combination with WSL 2 integration on Windows Server Core edition. Maybe in the Future, who knows?