Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Windows Server

How to Install, List and Manage Linux Distros in WSL

How to install Linux distros in WSL guide by 99RDP

The Windows Subsystem for Linux (WSL) runs real Linux distributions such as Ubuntu, Debian, Kali, openSUSE, AlmaLinux or Fedora directly on Windows, with no dual boot and no separate virtual machine to manage. You can install several distros side by side, pick a default, export them as backups and remove them when you're done. This guide covers installing WSL, choosing and adding distros, the most useful wsl commands, and how to fix the usual errors on Windows 10, Windows 11 and Windows Server.

Quick answer

wsl --install                    # install WSL with the default distro (Ubuntu)
wsl --list --online              # see available distros
wsl --install -d Debian          # install a specific distro
wsl --list --verbose             # see installed distros and their WSL version

What is WSL?

WSL 2 runs a real Linux kernel inside a lightweight, automatically managed virtual machine. Each distribution has its own files and packages, shares your Windows network, can open Windows files under /mnt/c, and can run Linux GUI apps through WSLg on Windows 11. Microsoft made WSL open source in 2025, and since 2026 it also includes WSL containers for running Linux containers without Docker Desktop.

Prerequisites

  • Windows 10 version 2004 or later, Windows 11, or Windows Server 2022/2025.
  • Hardware virtualization enabled in the BIOS/UEFI (on a VPS, the provider must allow nested virtualization).
  • Administrator rights for the first installation.

Step 1: Enable WSL

Open PowerShell or Command Prompt as administrator and run:

wsl --install

This enables the required Windows features, installs the latest WSL and installs Ubuntu as the default distribution. Restart when asked. After the restart, Ubuntu opens and asks you to create a Linux username and password (they don't need to match your Windows account).

To install WSL without any distro, use wsl --install --no-distribution.

Steps to install a Linux distribution on WSL: list available distros, install one, create a user, check the version
Install a distro on WSL

Step 2: Choose and install a distribution

List the distributions available online:

wsl --list --online      # short form: wsl -l -o

You'll see names such as Ubuntu, Ubuntu-24.04, Debian, kali-linux, openSUSE-Tumbleweed, AlmaLinux-9 and others; the exact list changes over time. Install one by its name:

wsl --install -d Ubuntu-24.04
wsl --install -d Debian

You can also install distros from the Microsoft Store, or from a file a vendor provides with wsl --install --from-file distro.wsl.

Step 3: Set up the Linux environment

Inside the new distro, update the packages first:

sudo apt update && sudo apt upgrade -y     # Ubuntu/Debian/Kali
sudo dnf upgrade -y                        # AlmaLinux/Fedora

Your Linux home folder is at \\wsl$\Ubuntu-24.04\home\yourname in File Explorer (or under "Linux" in the Explorer sidebar). Keep project files inside the Linux file system for the best performance; working on files under /mnt/c is much slower.

Common WSL commands: list, set default, set version, shutdown, unregister
Handy WSL commands

Step 4: Manage your distros

CommandWhat it does
wsl -l -vList installed distros, their state and WSL version
wsl -d DebianOpen a specific distro
wsl --set-default DebianMake a distro the default for wsl
wsl --set-version Ubuntu 2Convert a distro to WSL 2
wsl --set-default-version 2Use WSL 2 for future installs
wsl --terminate UbuntuStop one distro
wsl --shutdownStop all distros and the WSL VM
wsl --export Ubuntu D:\backup\ubuntu.tarBack up a distro to a file
wsl --import Ubuntu2 D:\WSL\Ubuntu2 D:\backup\ubuntu.tarRestore or clone a distro to another location
wsl --unregister UbuntuDelete a distro and all its data
wsl --updateUpdate WSL itself

Export and import are also the way to move a distro from the C: drive to another drive.

Tips

  • Use Windows Terminal; every installed distro appears as its own profile.
  • Limit WSL's memory and CPU in %UserProfile%\.wslconfig (for example [wsl2] then memory=8GB and processors=4).
  • Enable systemd inside a distro with [boot] systemd=true in /etc/wsl.conf (Ubuntu already has it on).
  • VS Code's WSL extension opens Linux folders with full Linux tooling.
Troubleshooting WSL error 0x80370102: turn on virtualization in BIOS and the Virtual Machine Platform feature
Error 0x80370102

Troubleshooting

  • Error 0x80370102: virtualization is disabled. Enable it in the BIOS/UEFI; on a VPS, ask the provider for nested virtualization, or use WSL 1 with wsl --set-version Distro 1.
  • "The Windows Subsystem for Linux has not been enabled": run wsl --install as administrator and restart.
  • No internet inside WSL: VPNs and custom DNS are the usual cause. Try networkingMode=mirrored under [wsl2] in .wslconfig, then wsl --shutdown.
  • Distro won't start after an update: run wsl --update and wsl --shutdown, then open it again.

Frequently asked questions

How do I list available WSL distros?

Run wsl --list --online (or wsl -l -o) to see distros you can install, and wsl -l -v to see installed ones.

How do I install a new distro in WSL?

Run wsl --install -d DistroName using a name from the online list.

How do I run a specific WSL distro?

Use wsl -d DistroName, or set it as the default with wsl --set-default DistroName.

Can I install WSL on Windows Server?

Yes. Windows Server 2022 and 2025 support wsl --install. On a VPS, WSL 2 also needs nested virtualization.

Minakshi, Server Administrator L1 at 99RDP
Written byMinakshiServer Administrator L1, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Windows Server guides

All Windows Server guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services