Apt update not working WSL2 Ubuntu24.04

Ubuntu Version:

24.04 LTS

Desktop Environment (if applicable):

WSL2

Problem Description:

Trying to do sudo apt update to follow a tutorial to install tensorflow GPU, but unable to pass this step. https://www.youtube.com/watch?v=VOJq98BLjb8&ab_channel=TechJotters

Relevant System Information:

Windows 11 24h2 latest version

CPU : 9800x3d
GPU RTX 5090
Ram: 32 gb 6000mhz cl28

Screenshots or Error Messages:

```

mdmos@MICONIC:~$ sudo apt update
[sudo] password for mdmos:
Ign:1 Index of /ubuntu noble InRelease
Ign:2 Index of /ubuntu noble-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Ign:2 Index of /ubuntu noble-security InRelease
Ign:4 Index of /ubuntu noble-backports InRelease
Ign:2 Index of /ubuntu noble-security InRelease
Ign:1 Index of /ubuntu noble InRelease
Err:2 Index of /ubuntu noble-security InRelease
Temporary failure resolving ‘security.ubuntu.com
Ign:3 Index of /ubuntu noble-updates InRelease
Ign:4 Index of /ubuntu noble-backports InRelease
Ign:1 Index of /ubuntu noble InRelease
Ign:3 Index of /ubuntu noble-updates InRelease
Ign:4 Index of /ubuntu noble-backports InRelease
Err:1 Index of /ubuntu noble InRelease
Temporary failure resolving ‘archive.ubuntu.com
Err:3 Index of /ubuntu noble-updates InRelease
Temporary failure resolving ‘archive.ubuntu.com
Err:4 Index of /ubuntu noble-backports InRelease
Temporary failure resolving ‘archive.ubuntu.com
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble/InRelease Temporary failure resolving ‘archive.ubuntu.com
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble-updates/InRelease Temporary failure resolving ‘archive.ubuntu.com
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/noble-backports/InRelease Temporary failure resolving ‘archive.ubuntu.com
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/noble-security/InRelease Temporary failure resolving ‘security.ubuntu.com
W: Some index files failed to download. They have been ignored, or old ones used instead




**What I've Tried**:
<!-- List any solutions or workarounds you've already attempted. -->Tried windows IP flash, tried changing the DNS in ubuntu

---
<!-- Please check if similar issues have been reported and resolved before posting.
* Thank you!
-->

This looks like a network issue (not an apt error).

Have you tested network connectivity on the Ubuntu system?

Is this a new system? Or did networking work properly before?

Hello, I have installed WSL2 and Ubuntu came by default on my Windows 11. I have installed this to run TensorFlow for the ML project. Inter internet seems to work fine on my PC, but the issue is seen on my virtual machine.

When I try to use ping 8.8.8.8 -n 100, it only pings once.

mdmos@MICONIC:/mnt/c/Users/mdmos$ ping 8.8.8.8 -n 100
PING 100 (0.0.0.100) 56(124) bytes of data.

That output is expected behavior when using -n 100 .

Try the following to test connectivity to the actual Ubuntu servers.

ping archive.ubuntu.com -c 4

This is the result

mdmos@MICONIC:~$ ping archive.ubuntu.com -c 4
ping: archive.ubuntu.com: Temporary failure in name resolution
mdmos@MICONIC:~$