
Windows Subsystem for Linux (WSL) lets you run Ubuntu, Debian and other Linux distributions directly on Windows Server, without a separate virtual machine. On Windows Server 2019 there is no one-line installer: you enable the feature, download a distribution package and register it by hand. This guide covers that manual install step by step, plus the much simpler method for Windows Server 2022 and 2025.
Quick answer
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Restart-Computer
# after the restart:
New-Item -ItemType Directory C:\WSL
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2204 -OutFile C:\WSL\Ubuntu.appx -UseBasicParsing
Rename-Item C:\WSL\Ubuntu.appx Ubuntu.zip
Expand-Archive C:\WSL\Ubuntu.zip C:\WSL\Ubuntu
C:\WSL\Ubuntu\ubuntu.exe
On Windows Server 2022 or 2025, just run wsl --install and restart.
WSL 1 or WSL 2 on Windows Server?
| Windows Server version | Install method | WSL version |
|---|---|---|
| 2019 (1809, build 17763) | Manual (this guide) | WSL 1 only |
| 2022 Desktop Experience | wsl --install | WSL 1 and WSL 2 |
| 2025 (Desktop and Server Core) | wsl --install | WSL 1 and WSL 2 |
Microsoft's WSL 2 kernel update only applies to Windows builds 18362 and higher. Windows Server 2019 is build 17763, so it runs WSL 1. WSL 1 is fine for shell scripts, Git, SSH, Python, Ansible and most command-line tools. If you need Docker or a full Linux kernel, use Windows Server 2022 or 2025 with WSL 2.
Install WSL on Windows Server 2019
Step 1: Enable the Windows Subsystem for Linux feature
Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Type Y to restart, or restart later with Restart-Computer. You can also tick Windows Subsystem for Linux in Server Manager → Add Roles and Features → Features.
Step 2: Download a Linux distribution
Windows Server 2019 has no Microsoft Store, so download the distribution package directly from Microsoft's links:
New-Item -ItemType Directory C:\WSL
Set-Location C:\WSL
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2204 -OutFile Ubuntu.appx -UseBasicParsing
Other distributions (Debian, Kali, openSUSE) are listed on Microsoft's manual download page.
Step 3: Extract the package
Rename-Item .\Ubuntu.appx Ubuntu.zip
Expand-Archive .\Ubuntu.zip .\Ubuntu
If the folder contains several .appx files (an appxbundle), pick the one ending in _x64.appx, rename it to .zip and extract that file the same way.
Step 4: Run the installer and create your Linux user
.\Ubuntu\ubuntu.exe
The first run unpacks the filesystem, which takes a minute or two, then asks for a Linux username and password. This account is separate from your Windows login and has sudo rights.
Step 5: Add the distribution to your PATH
$p = [Environment]::GetEnvironmentVariable('Path','User')
[Environment]::SetEnvironmentVariable('Path', "$p;C:\WSL\Ubuntu", 'User')
Open a new terminal. You can now start Linux by typing ubuntu or wsl.
Step 6: Update the distribution
sudo apt update && sudo apt upgrade -y
wslconfig /l # list installed distributions
Install WSL on Windows Server 2022 and 2025
wsl --install
Restart-Computer
wsl --list --verbose
This enables the required components, installs the WSL 2 kernel, sets WSL 2 as the default and installs Ubuntu. To pick another distribution, run wsl --list --online and then wsl --install -d Debian. Windows Server 2022 needs its updates from June 2022 or later for WSL 2, so run Windows Update first.
WSL on a VPS or cloud server
WSL 1 works on any Windows VPS because it doesn't use virtualization. WSL 2 runs inside a lightweight Hyper-V VM, so on a VPS it only works if the provider enables nested virtualization. If wsl --install fails with a virtualization error, use WSL 1 (wsl --set-default-version 1) or run WSL 2 on a dedicated server.
Frequently asked questions
Can I install WSL on Windows Server 2019?
Yes. Enable the Microsoft-Windows-Subsystem-Linux feature, restart, then download, extract and run a distribution package manually. Windows Server 2019 supports WSL 1.
Does Windows Server 2019 support WSL 2?
No. WSL 2 needs Windows build 18362 or later, and Windows Server 2019 is build 17763. Use Windows Server 2022 or 2025 for WSL 2.
Why doesn't wsl --install work on Windows Server 2019?
The --install option only exists in newer versions of wsl.exe. On Windows Server 2019, use the manual steps in this guide.
Can I run Docker in WSL on Windows Server 2019?
Not with Docker Engine in WSL 1, because WSL 1 has no real Linux kernel. Use a Linux VM, WSL 2 on Windows Server 2022/2025, or a Linux server.
How do I uninstall a WSL distribution?
Run wslconfig /u Ubuntu (or wsl --unregister Ubuntu on newer versions), then delete the extracted folder.


