How to Fix “Temporary failure resolving…” Error in WSL
| |
When the above error appears in WSL, the DNS server settings might be incorrect. In my environment, I solved it with the following steps.
- Start WSL.
- Run
sudo nano /etc/resolv.conf. - Change the
nameserverline as follows:
| |
- Save with
Ctrl+Sand exit withCtrl+X. - Run
sudo apt update. - If the error doesn’t appear, it’s solved.
If the above steps do not solve the issue
It seems there are cases where the above steps don’t resolve the issue. Please refer to the following article:
