Inhaltsverzeichnis

WSL (Windows subsystem for Linux) ist eine minimale Linux-Umgebung.

wsl --install -d ubuntu
wsl --list
wsl -d ubuntu // --distribution
wsl --unregister ubuntu

// install/uninstall Distribution from Windows
winget install --id Canonical.Ubuntu
winget uninstall --id Canonical.Ubuntu

// show status
wsl -l -v

// shutdown everything
wsl --shutdown

// terminate specific vm
wsl -t <name>

ip addr add 192.168.0.2/24 broadcast 192.168.0.255 dev eth0
ip addr del 192.168.0.2/24 dev eth0 

wsl --distribution <image-name> --user <user> --exec <command>

// https://superuser.com/a/1676054
wsl -- ip -o -4 -json addr list eth0

Mehrere Instanzen der selben Distribution erstellen

// Install Ubuntu base image
wsl--install -d Ubuntu

// configure some stuff for the base image

// export the base image
// wsl --export <distribution-name> <filename>
wsl --export Ubuntu ubuntu.tar

// import the exported base image
// wsl --import <new-distribution-name> <install-location> <filename>
wsl --import Ubuntu2 C:\Users\User\UbuntuVM ubuntu.tar