WSL2でネットワークのドメインを解決できない場合の対処
WSL2上のLinux(ex.Ubuntu)で,
ping google.com
やapt update
がうまく行かない場合(Temporary failure)の対処である.
どうやらDNSサーバの設定がよくなく?ドメインの解決ができなくなっているぽい.
参考:
Apt-get update and apt-get upgrade fail · Issue #4435 · microsoft/WSL · GitHub
- WSL2 DNS stops working · Issue #4285 · microsoft/WSL · GitHub
現状(2020/07/16),原因は不明ぽいです.
(/etc/resolv.conf
がどっかのタイミングで勝手に書き換わる?)
環境
- Windows10 ver2004(OSビルド 19041.330)