Score:0

How to install Linux distro on Windows Server 2019 and WSL version 1

cn flag

I am trying to use WSL on a server with Windows Server 2019 (Version 1809). I enabled the WSL feature and can execute the wsl command in powershell.

PS C:\Users\user> wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

It seems that the Microsoft Store Desktop App is not supported by this version of Windows.

I tried to download an appx package by

curl.exe -L -o ubuntu.appx https://aka.ms/wslubuntu2204

and installing it via Add-AppxPackage but this gives me the following error:

(base) PS C:\Users\user> Add-AppxPackage ubuntu.appx
Add-AppxPackage : Deployment failed with HRESULT: 0x80080204, The Appx package's manifest is invalid.
error 0xC00CE015: App manifest validation error: The app manifest must be valid as per schema: Line 22, Column 96,
Note: The schema for MaxVersionTested specified does not recognize XML fields with namespace
"http://schemas.microsoft.com/appx/manifest/uap/windows10/10". Please ensure that you have the correct
MaxVersionTested specified. Reason: The attribute
'{http://schemas.microsoft.com/appx/manifest/uap/windows10/10}Parameters' on the element
'{http://schemas.microsoft.com/appx/manifest/foundation/window

Is there a way to download and install a Linux distro (preferably Ubuntu) for this version of Windows?

As far I as I can tell I have to stick with WSL version 1 and cannot upgrade to WSL version 2 because my Windows version is too old.

Score:2
cn flag

With the installation instructions that I was pointed to by @Abdel.Hou in his answer I could finally install Ubuntu in WSL. It did not work as described in these installations instructions directly because using Add-AppxPackage as described there failed. That is why I want to document the steps in a separate answer. The steps are as follows (with PowerShell commands):

  1. Enable WSL in Windows via:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  1. Download Ubuntu, e.g. Ubuntu 22.04:
Invoke-Webrequest -Uri https://aka.ms/wslubuntu2204 -OutFile .\Ubuntu2204.appx -UseBasicParsing
  1. Rename the downloaded file Ubuntu2204.appx to Ubuntu2204_.zip, then extract this archive. Inside there are different appx files for different platforms. Choose the one for your platform, e.g. Ubuntu_2204.1.7.0_x64.appx.

  2. Rename the appx file for your platform to Ubuntu2204.zip and extract this archive.

  3. Extract the files in Ubuntu2204.zip to the target location where you would like your linux distro to reside.

  4. Open the target location folder with the files of Ubuntu2204.zip and run the file ubuntu.exe, which is located inside the folder. This will install the distribution. It is important that you don't move the folder any more after the installation as this will result in an error when starting Ubuntu later.

  5. Add the folder containing the ubuntu.exe file to the path variable. Ubuntu can then be started via ubuntu on the command line.

Score:1
cn flag

You can try this procedure : learn.microsoft.com - Install WSL on previous versions of Windows Server

quote :

To install WSL on Windows Server 2019 (version 1709+), you can follow the manual install steps below.

esel avatar
cn flag
Thanks for the link. As it did not work exactly as described there and it was a bit lengthy to finally get there, I documented my procedure in another answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.