I have recently installed Ubuntu 22.04 for WSL on a windows 11 machine. I have used WSL previously on a windows 10 machine without encountering this issue.
After the initial setup I tried to update / upgrade and was presented with the error "Failed to fetch archive.ubuntu.com" and later "Temporary failure to resolve archive.ubuntu.com". I have read online that the resolv.conf file namespaces may be the issue, but neither /resolvconf or resolv.conf exist. When I went to create /etc/resolv.conf it gave me a permission denied error upon saving. I can ping 8.8.8.8 but not archive.ubuntu.com, although I can visit that site in my browser.
It seems like I have a sort of circular problem and I am not sure what else to try. Any help is greatly appreciated.