informatica:windows:wsl
This is an old revision of the document!
Por si acaso, la instalación se hace dede cmd y no desde powershell
Mostrar distribuciones de WSL para instalar:
wsl --list --online
The following is a list of valid distributions that can be installed. Install using 'wsl --install -d <Distro>'. NAME FRIENDLY NAME Ubuntu Ubuntu Debian Debian GNU/Linux kali-linux Kali Linux Rolling openSUSE-42 openSUSE Leap 42 SLES-12 SUSE Linux Enterprise Server v12 Ubuntu-16.04 Ubuntu 16.04 LTS Ubuntu-18.04 Ubuntu 18.04 LTS Ubuntu-20.04 Ubuntu 20.04 LTS
Instalamos distribuciones:
wsl --install -d Ubuntu wsl --install -d Debian
Vemos distribuciones y versiones:
wsl -l -v
NAME STATE VERSION * Debian Running 2 Ubuntu Stopped 2
Cambiamos la versión de Debian a 1 porque con la 2 da problemas de RED:
wsl --set-version Debian 1
Cambiar la versión default para todas las distribucionesç
wsl --set-default-version 2
Ejecutamos una distribución específica:
wsl -d Ubuntu
To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ruth@ES-L300678:/mnt/c/Users/joseantonio.legidoma$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal
Cambiamos la distribución por defecto a Ubuntu:
wsl --setdefault Ubuntu
wsl -l -v
NAME STATE VERSION * Ubuntu Running 1 Debian Running 2
DOCKER
Si no arranca docker puede ser por el firewall de windows o por iptables de debian
Si al arrancar con
dockerd
Da este error
ERRO[2023-10-20T17:46:58.039296309+02:00] failed to initialize a tracing processor "otlp" error="no OpenTelemetry endpoint: skip plugin"
Podemos arrancar con
dockerd --iptables=false
O para hacerlo permanente editamos el fichero
/etc/default/docker
Y añadimos:
DOCKER_OPTS="--iptables=false"
Así ahora también lo podemos arrancar como servicio
informatica/windows/wsl.1697816930.txt.gz · Last modified: 2023/10/20 15:48 by jose