I needed to create a resolv.conf file since my kali WSL only had a resolv.conf~ file (which had nameserver 8.8.8.8 already but didn't work). Thank you

Quote Originally Posted by ohhru View Post
If anyone is coming here using WSL and getting the error, doing what this dude suggested worked.
Originally Posted by FirtusCahi
To resolve the error you must check /etc/resolv.conf
This file is the resolver configuration file in Linux systems.
It contains the DNS entries that help your Linux system to resolve domain names into IP addresses.
If this file is not present or is there but you are still having the name resolution error, create one and append the Google public DNS server as shown
nameserver 8.8.8.8