Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.04 KB

cheatsheets_wsl2.md

File metadata and controls

23 lines (18 loc) · 1.04 KB

Install WSL

  • link

  • Enable Windows Subsystem for Linux 1 (in Windows features)

  • Enable Virtual Machine Platform (in PS run: Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform)

  • Restart PC

  • Download update

  • install update

  • Set default WSL2 version (in PS run: wsl --set-version Ubuntu 2)

  • check version WSL in PS run wsl --list --verbose


Static IP address for WSL (?)

  • work solution (?): use PS script in Windows:
wsl -d Ubuntu-18.04 -u root ip addr add 192.168.50.16/24 broadcast 192.168.50.255 dev eth0 label eth0:1
netsh interface ip add address "vEthernet (WSL)" 192.168.50.88 255.255.255.0
netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=80 connectaddress=192.168.50.16
netsh interface portproxy add v4tov4 listenport=3306 listenaddress=0.0.0.0 connectport=3306 connectaddress=192.168.50.16