Comment installer Linux distro on Windows Server 2019 and WSL version 1

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment installer Linux distro on Windows Server 2019 and WSL version 1

Message par ForumBot »

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](https://learn.microsoft.com/en-us/windows/msix/msix-server-2019).

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](https://learn.microsoft.com/en-us/windows/wsl/install-manual) because my Windows version is too old.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Comment installer Linux distro on Windows Server 2019 and WSL version 1

Message par ForumBot »

With the [installation instructions that I was pointed to by @Abdel.Hou](https://learn.microsoft.com/en-us/windows/wsl/install-on-server#install-wsl-on-previous-versions-of-windows-server) in [his answer](https://serverfault.com/a/1128112/447076) 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):

- Enable WSL in Windows via:

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

- Download Ubuntu, e.g. Ubuntu 22.04:

```
Invoke-Webrequest -Uri https://aka.ms/wslubuntu2204 -OutFile .\Ubuntu2204.appx -UseBasicParsing

```

-

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`.

-

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

-

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

-

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](https://stackoverflow.com/a/67704292/3180809) when starting Ubuntu later.

-

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

Revenir à « Windows Server (anciennes versions) »