]> Installing openSUSE WSL on Windows Server 2022 🌐:aligrant.com

Installing openSUSE WSL on Windows Server 2022

Alastair Grant | Wednesday 9 March 2022

For the uninformed, Windows Subsystem for Linux (WSL) allows the running of a Linux terminal through Windows, and run all the apps that you'd normally enjoy on a native Linux desktop.  You can install many distributions from the Microsoft App Store - the catch is, if you're using Windows Server 2022, there is no App Store.

We thus need to install it manually.  It's a bit step-intensive, but not too complicated.  As most things Linux, I'm going with openSUSE here, and I'm opting for Tumbleweed, which allows access to the latest, tested, packages without having to run on an unstable development branch.

Importing certificates

By default, Windows does not trust the openSUSE root certificate authority, we will first need to download this certificate and import it into the trusted certificate store in Windows.  And of course, this is not straight forward to do, because why would it be?

openSUSE doesn't appear to publish their public certificate in a easy to obtain place, the easiest way to get it, it seems, is to download a RPM from a openSUSE Leap repository.

  1. Search a recent openSUSE Leap OSS SRC repository (e.g. http://download.opensuse.org/source/distribution/leap/15.3/repo/oss/src/) for the "shim" package (this will be named shim-XXXX.rpm).
  2. Download the RPM
  3. Open the RPM with a tool like 7-Zip
  4. Extract the files "openSUSE-UEFI-CA-Certificate.crt" and "SLES-UEFI-CA-Certificate.crt"
  5. Install both certificates into the WIndows "Local Machine", "Trusted Root Certificate Authorities" store.

Enabling WSL

In Windows, we need to enable WSL support, this is straight-forward with this command:

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

A restart will be required.

Installing the AppX

We will need to get a copy of the "appx" file to install, fortunately for us, openSUSE published this to download from the openSUSE WSL repository (the filename will change as they update the snapshot date).

Once it's downloaded, we can install it using an Administrative PowerShell command Add-AppxPackage:

Add-AppxPackage -Path .\opensuse-Tumbleweed-x64-SnapshotXXXX.appx"

This should simply install, and we can launch it by typing "opensuse-tumbleweed.exe".  This will go through an installation process, and can take a bit of time.  You will need to setup an account and what not.  From then on, just use the command "wsl" to launch, or find the shortcut in your Start Menu.

Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.