WSL2 Ubuntu 20 can no longer apt-get, so what to do

Introduction

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.

environment

procedure

Impressions

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

WSL2 Ubuntu 20 can no longer apt-get, so what to do
After using Android Studio 3, Java application dependencies can no longer be resolved, so what to do about it
What to do if you install Ubuntu
What to do when booting Ubuntu on WSL2 and getting "Process terminated with code 1"
After updating to OSX Catalina, I can no longer sass
[Ubuntu 20.04] What to do if the external monitor is not recognized
What to do after Vagrant install
What to do when javax.batch.operations.JobStartException occurs
no space left on device What to do if an error occurs
Update your default distribution to Ubuntu-20.04, WSL 2
What to do after updating Dockerfile, docker-compose.yml
What to do when a javax.el.PropertyNotWritableException occurs
What to do when undefined method ʻuser_signed_in?'
What to do when you want to delete a migration file that is "NO FILE"
[Ubuntu] What to do when MongoDB cannot be started due to a SocketException error
What to do if you get the warning "Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1." in Rails 6.0