Did you try to install WSL2 on Windows Server 2019 through wsl --install
?
Did you try to install Microsoft Store?
Unfortunately it doesn't work on Windows Server 2019.
But it has soluction.
The solution was based on the link below:
Just follow the steps:
Those steps below needs to be done other and Administrator
cd C:\Users\Administrator\
Enable the Windows Subsystem for Linux
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Download a Linux distribution
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
Extract and install a Linux distribution
Rename-Item .\Ubuntu.appx .\Ubuntu.zip
Expand-Archive .\Ubuntu.zip .\Ubuntu
Add your Linux distribution path to the Windows environment PATH
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")
Start installation (change directory to directory where is ubuntu.exe)
ubuntu.exe
If is it usefull, please leave your comment or suggestion.
If it doesn't work, let's try together
Top comments (3)
You collected all the pitfalls and condensed it to the way I successfully used to get Ubuntu 20.04 LTS up and running under WSL in Windows Server 2019 Datacenter , but are you sure you ended up with WSL2? I got just WSL1.
If you cannot
wsl --list
you are on WSL1.I was on the official LTSC build Windows Server 2019 Datacenter build version "1809"
Check notes at serverfault.com/a/1052298: After 2020.1.31, there is no way to run WSL2 on Windows Server 2019 in Production except on Internal Preview versions after version 1709.
The only official MS info I found, was for Windows Server 2022:
WSL 2 distros are now supported on Windows Server
at devblogs.microsoft.com/commandline...
Yes! Indeed, it's about WSL1 and not WSL2 sorry for my mistake
For the nail in the coffin read: github.com/MicrosoftDocs/WSL/issue...