The sudo apt-get update isn't working on WSL

Asked by Nazmus Sakib Sibly

I am currently using Ubuntu in WSL on Windows 11. Recently I've noticed that when ever I am trying to update the software repository references using "sudo apt-get update" I am getting this message:
```
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
```
also the "ping www.google.com" says this :
```
ping: www.google.com: Temporary failure in name resolution
```
It seems that my terminal isn't able to connect to the internet.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Nazmus Sakib Sibly
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you ping 8.8.8.8 do you get a reply?

Revision history for this message
Bernard Stafford (bernard010) said :
#2
Revision history for this message
Nazmus Sakib Sibly (sibly) said :
#3

Yes. If I use the command "ping 8.8.8.8" there is a reply.

Revision history for this message
Nazmus Sakib Sibly (sibly) said :
#4

Thanks. I found it was my antivirus that was blocking the incoming and out going connection through firewall.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Ah awesome news

Revision history for this message
Bernard Stafford (bernard010) said :
#6

Awesome !

Revision history for this message
Stephen Dickens (shtiv) said :
#7

Yo my guy, how did you figure out your antivirus was blocking incoming and outgoing? I'm having the exact same issue and it seems as though windows subsystem for linux is being let throuh just fine by my firewall. So I'm a little stumped...

Revision history for this message
Stephen Dickens (shtiv) said :
#8

Yo my guy, how did you figure out your antivirus was blocking incoming and outgoing? I'm having the exact same issue and it seems as though windows subsystem for linux is being let throuh just fine by my firewall. So I'm a little stumped...