openSUSE for WSL
WSL (Windows Subsystem for Linux) is a special interface of the Microsoft Windows 10 operating system that allows to run Linux user space programs on top of the Windows kernel. In a sense similar to how a chroot or containers work on Linux.
Enabling WSL on Windows 10
WSL is not enabled by default on Windows 10. It needs to be installed explicitly for WSL apps to work. There are two ways to enable WSL:
Open a command prompt (cmd.exe) as administrator and run the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Open Control Panel (Start > Windows System > Control Panel).
- If you see eight to ten items: Click the "View by:" drop-down box and select, "Small icons."
- Open "Programs and Features."
- Click the "Turn Windows features on or off" hyperlink.
- In the Windows Features window, check "Windows Subsystem for Linux." The list is alphabetized, so it should appear near the bottom.
- Click the OK button to close the Windows Features Window.
- Close the Control Panel.
- Restart your computer (Required).
To enable WSL2 you need to be on Windows 10 version 2004, Build 19041 or higher.
Open a Power Shell as administrator and run the following command:
wsl --set-default-version 2
You may see the following warning:
WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
If so follow the link to download and install the WSL2 Kernel package Once installed run the above command again
Enabling GUI support
Please follow the WSLg instructions prior to going any further. A system without WSLg enabled would mostly complain about the "DISPLAY" variable not being set Based on the time when you try this you may or may not need to join the Insider program to access the feature.
Users should install our wsl_gui pattern which will fetch all required dependencies.
zypper in -t pattern wsl_gui
These additional patterns are also available and can be installed in the same way:
Installing openSUSE on WSL
From App Store
The easiest way to get openSUSE for WSL is to install the apps from the app store:
The app store also offers SUSE Linux Enterprise versions:
At firstboot, users can choose between registering their SLE install as SLES (Enterprise Server) or SLED (Enterprise Desktop) to suit their licensing needs.
With Appx from openSUSE download server
You can get the appx file from the openSUSE download server:
- openSUSE Tumbleweed aarch64 : Go to https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/ filter with appx and download the appx file
- openSUSE Tumbleweed x86_64 : Go to https://download.opensuse.org/tumbleweed/appliances/ filter with appx and download the appx file
Now, you need to install the openSUSE certificate, if not already installed:
- Right-click on the appx file and chose Properties, digital signatures, select the signature, click Details, Show certificate and Install certificate. This displays the Certificate Import Wizard.
- Click the radio button to chose Local Machine and click Next
- Chose Place all certificates in the following store and click Next
- Click Browse and select Trusted People and click Ok, Next and finally Finish
- A confirmation dialog should appear, click Ok
Manually from tar archive
Alternatively it's also possible to install development versions manually
Windows 11 and WSL
- Installation on Windows 11 is similar to Windows 10, but the experience should be "better" overall. Visit https://github.com/Microsoft/WSL for updated versions of WSL which include features like systemd support.
Installed via an elevated PowerShell prompt with:
For example, adding/editing /etc/wsl.conf on a WSL distro will enable systemd to function:
Known Issues and limitations
- The apps unpack a root file system tarball in a WSL specific location in the Windows C: drive. Make sure to have sufficient space there. Other drives will not work due to limitations of WSL!
- Since the root filesystem is disconnected from the app after installation, any potential update of the app won't actually update the root file system content. The installed openSUSE system on WSL has to be updated from within as usual using zypper patch for maintenance updates, resp zypper up or zypper dup for updates and upgrades.
- A system in WSL does not actually boot and does not use systemd. A proprietary Microsoft /init binary initializes the system. Therefore service management does not work like in a VM. It rather behaves like an interactive container.
- If the following error message is displayed when you try to start WSL
Error: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel
Please install the wsl2 kernel update:
- For aarch64 (arm64): https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_arm64.msi
- For x86_64 (x64): https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Bugs about openSUSE on WSL can be reported in Bugzilla
WSL specific bugs unrelated to openSUSE have to be reported to Microsoft via GitHub
- Common Error Codes
- About Windows Subsystem for Linux (WSL)»
- Windows 10 Installation Guide»
- Windows Server Installation Guide»
- Windows Subsystem for Linux (WSL) for Enterprise»
- Frequently Asked Questions about Windows Subsystem for Linux (WSL)»
- Troubleshooting Windows Subsystem for Linux (WSL)»
- About WSL2
- Run Linux tools from a Windows command line»
- Run Windows tools from WSL»
- Share environment variables between Windows and WSL»