I got an error after a long time with sudo apt update
on WSL2 Ubuntu. I wondered what it was, but I couldn't connect even if I did ping google.com
, so when I googled, [this article](https://cartman0.hatenablog.com/entry/2020/07/16/WSL2 % E3% 81% A7% E3% 83% 8D% E3% 83% 83% E3% 83% 88% E3% 83% AF% E3% 83% BC% E3% 82% AF% E3% 81% AE% E3 % 83% 89% E3% 83% A1% E3% 82% A4% E3% 83% B3% E3% 82% 92% E8% A7% A3% E6% B1% BA% E3% 81% A7% E3% 81 % 8D% E3% 81% AA% E3% 81% 84% E5% A0% B4% E5% 90% 88) was found and resolved. Thanks!
I needed another effort in my environment, so I will leave only the additional notes in the article.
[Reference article](https://cartman0.hatenablog.com/entry/2020/07/16/WSL2%E3%81%A7%E3%83%8D%E3%83%83%E3%83%88 % E3% 83% AF% E3% 83% BC% E3% 82% AF% E3% 81% AE% E3% 83% 89% E3% 83% A1% E3% 82% A4% E3% 83% B3% E3 % 82% 92% E8% A7% A3% E6% B1% BA% E3% 81% A7% E3% 81% 8D% E3% 81% AA% E3% 81% 84% E5% A0% B4% E5% 90 % 88) Do 1 to 4
Execute wsl
in step 5
Do sudo rm /etc/resolv.conf
→ Did the symbolic link that existed in the original settings disappear in step 3? Deleted because it could not be overwritten with permissions
Execute sudo vim /etc/resolv.conf
in step 5
Perform step 6
I don't understand it well, but after reading some articles, isn't it particularly supported on the MS side? It seems that it is necessary to set it a little forcibly. It is difficult because the network is deep and security is involved. I would appreciate it if you could tell me if there are any mistakes or better methods.
Recommended Posts