Skip to content

WSL

WSL is the "Windows Subsystem for Linux" and is an optional feature you can enable to use Linux in Windows 10 and newer.

Enable WSL

Run PowerShell as administrator and use the following command to enable WSL2:

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

Download and install Ubuntu without Windows Store

If you can't use the Windows Store to install Ubuntu in WSL, you can do this manually as following:

Go to https://learn.microsoft.com/en-US/windows/wsl/install-manual and look for the download link of the AppxBundle package for Ubuntu linux and download the package.

Then open a PowerShell as administrator, change to the download path and use the following command to register the bundle, for example if you downloaded Ubuntu 22.04 LTS:

Add-AppxPackage .\Ubuntu2204-221101.AppxBundle

Now you can double click the package Ubuntu2204-221101.AppxBundle in the Windows Explorer to install Ubuntu in WSL. When the process finished, you will find a new shortcut in the start menu named "Ubuntu" wich will open a console to Ubuntu. If you use Windows Terminal there will be a new session "Ubuntu" (you may have to restart Windows Terminal if you installed Ubuntu while it was open).

Upgrade installed distribution WSL version 2

WSL version 2 allows desktop integration with Windows and many other helpful features. However it may have to be enabled first for the installed Linux distribution you are using.

To find out the name of your Linux distribution, you can use:

wsl --list

To enable WSL2 for a specific distribution run the following command, for example for the distribution Ubuntu-22.04:

wsl --set-version Ubuntu-22.04 2

To find out more about the desktop integration for Ubuntu in WSL see https://github.com/microsoft/wslg.