← Все руководства
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.
Это руководство составлено на основе официальной документации Managing multiple WSL distros, ссылка на которую есть выше — всегда сверяйте точные названия пакетов/версий там перед запуском этих команд на рабочем сервере, так как версии дистрибутива и проекта со временем меняются.
1List distros available to install
wsl --list --online2Install additional distros
wsl --install -d Debianwsl --install -d kali-linuxEach installs as a fully separate environment -- files, packages, and configuration in one distro never affect another.
3List installed distros and set a default
Plain `wsl` with no arguments launches whichever distro is set as default.
wsl --list --verbosewsl --set-default Ubuntu4Launch a specific distro directly
wsl -d Debian5Remove a distro you no longer need
wsl --unregister kali-linuxThis permanently deletes that distro's entire filesystem -- back up anything inside it first.