Score:0

UpUbuntu 20.04.2 LTS Wifi Network / Ethernet connected but no internet

lk flag

I recently installed Ubuntu 20.04 LTS being a previous windows user. However, now I have the issue that neither Ethernet nor other WiFi connections let me access the internet. Other devices around me connect with no troubles. I have followed several other suggestions like this one but without success.

ping 8.8.8.8 yields PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data

and

ping www.google.com yields Temporary failure in name resolution

I am not sure what other information to provide and would appreciate any suggestions.

Update: I came across this forum, where it was suggested to run the following commands:

sudo rm /etc/resolv.conf

sudo echo 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf

After running this, the internet connection begins to work. However, if I reboot the computer then I have to do it all over again.

As requested by @chili555, the output of ls -al /etc/resolv.conf is :

-rw-r--r-- 1 root root 19 Jul 7 17:36 /etc/resolv.conf

waltinator avatar
it flag
Look at the logs! `sudo journalctl -b 0 -u NetworkManager`. Read `man journalctl`.
jpbrain avatar
ca flag
@nbob. Can you post the output of "ifconfig -a"? and also how are you connected to internet (hardware)?
nbob  avatar
lk flag
@jpbrain itconfig is not found and I also cannot install it because no internet connection. I have tried both Ethernet cable and several wifi connections to connect
nbob  avatar
lk flag
@waltinator sorry I am not sure how to interpret that output
chili555 avatar
cn flag
Please edit your question to show the result of: `ls -al /etc/resolv.conf` Welcome to Ask Ubuntu.
Score:1
cn flag

The file resolv.conf is incorrect. Please do:

sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

Now check:

ping -c3 www.ubuntu.com

If you get ping returns, you're all set.

nbob  avatar
lk flag
I followed the two commands, however ```ping -c3 www.ubuntu.com``` still returns "Temporary failure in name resolution"
chili555 avatar
cn flag
How about: `ping -c3 8.8.8.8` ?
nbob  avatar
lk flag
That yields ```PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data```
chili555 avatar
cn flag
Please reboot and try again: `ping -c3 8.8.8.8` and: `ls -al /etc/resolv.conf`
nbob  avatar
lk flag
I rebooted then did ```sudo rm -f /etc/resolv.conf``` then ```sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf```. The output from ```ls -al /etc/resolv.conf``` is ```lrwxrwxrwx 1 root root 32 Jul 8 21:49 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf```. ping -c3 8.8.8.8 shows ```PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=18.1 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=16.9 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=16.1 ms``` and ```ping -c3 www.ubuntu.com``` gives temporary failure in name resolution
chili555 avatar
cn flag
We have made some progress. You are connected to the internet but still cannont resolve names to numbers. Are there any settings in Network Manager that relate to DNS? https://www.liberiangeek.net/wp-content/uploads/2013/03/google_dns_provider_1_thumb.png
nbob  avatar
lk flag
When checking IPv4 or IPv6 in the current internet connection, they are both set to just "Automatic" and the DNS fields are empty.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.