MirrorNest
← Alle Anleitungen

Managing multiple WSL distros

Install and switch between several Linux distributions side by side under WSL2 -- useful for testing across distros, or keeping a clean distro per project without them interfering with each other.

Zielsystem: Windows 11 (or Windows 10 2004+)DevelopmentOffizielle Website ↗Offizielle Dokumentation ↗
Diese Anleitung basiert auf der offiziellen Dokumentation von Managing multiple WSL distros, oben verlinkt — überprüfe dort immer die genauen Paket-/Versionsnamen, bevor du diese Befehle auf einem Produktionsserver ausführst, da sich Distributions- und Projektversionen mit der Zeit ändern.
  1. 1List distros available to install

    wsl --list --online
  2. 2Install additional distros

    wsl --install -d Debian
    wsl --install -d kali-linux

    Each installs as a fully separate environment -- files, packages, and configuration in one distro never affect another.

  3. 3List installed distros and set a default

    Plain `wsl` with no arguments launches whichever distro is set as default.

    wsl --list --verbose
    wsl --set-default Ubuntu
  4. 4Launch a specific distro directly

    wsl -d Debian
  5. 5Remove a distro you no longer need

    wsl --unregister kali-linux

    This permanently deletes that distro's entire filesystem -- back up anything inside it first.