Ubuntu 20.04 WSL2 /etc/resolv/conf 重复覆盖问题

sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
sudo bash -c 'echo "[network]" > /etc/wsl.conf'
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
sudo chattr +i /etc/resolv.conf

posted @ 2022-01-12 15:15  caimagic  阅读(719)  评论(0编辑  收藏  举报