wsl2 bridged

  1. hyper-v 添加 external, 名字为WIFI
  2. notepad %UserProfile%/.wslconfig
[wsl2]
networkingMode=bridged
vmSwitch=WIFI
ipv6=true
  1. WSL
sudo vim  /etc/resolv.conf # 编辑该文件并添加以下内容
nameserver 114.114.114.114
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5

sudo vim /etc/wsl.conf

[boot]
systemd=true
[network]
generateResolvConf = false

https://zhuanlan.zhihu.com/p/617357186

posted @ 2024-04-28 17:05  twfb  阅读(20)  评论(0编辑  收藏  举报