12

I've installed Kubuntu 18.04 on a desktop with an ethernet connection. During the installation, updates were downloaded and the internet was working fine. Once the operating system is installed, every time I try to ping any website I get the following error:

Temporary failure in name resolution

I've tried the ethernet cable on different computers and it works, so I don't know what I should do next.

15

There are different possible reasons for a failure in name resolution.

  1. You don't have any internet connectivity. Try

    ping -c4 8.8.8.8
    

    If you get answers, then your internet connection works. Else find out why it doesn't

  2. You have the wrong resolver. Type

    cat /etc/resolv.conf
    

    You should see at least one line

    nameserver a.b.c.d
    

    The a.b.c.d is typically the address of your router. If there is no such line, add one. If there is such a line, but it doesn't work, of if you don't know the address of your router, try nameserver 8.8.8.8. This uses the Google DNS servers at 8.8.8.8.

3
  • 1
    It's work, but when I disconnected VPN and next connected to VPN, then inside file /etc/resolv.conf disappear nameserver a.b.c.d and I must add nameserver again
    – michal
    Oct 22 '20 at 14:52
  • Then your distribution has some mechanism that changes the file, and does it wrong. As this is only marginally related to this question, you should create a new question with more information about your system.
    – RalfFriedl
    Oct 22 '20 at 14:55
  • I wrote query here.
    – michal
    Oct 22 '20 at 15:09
2

If you are using VMWARE running linux vm on windows, my experience maybe helpful:

systemctl restart NetworkManager.service

It happens when you havn't shut down your vm correctly.

2
  • Same set up here, but oddly I had to restart my VM entirely. After restarting networking I could ping hosts and see them resolving properly, but still had resolution errors in tomcat. Didn't spend any more time trying to track down exactly what was going on.
    – Windle
    Aug 3 '20 at 13:32
  • Hi, I ran ifconfig in linux and found no Ethernet, then restart the networking service resolve it. As you could ping hosts, I thought it should be Tomcat troubles..Sorry I am not sure about Tomcat.:-( Aug 5 '20 at 13:14
1

I solve the problem changing the dns setting in my router and set the google dsn 8.8.8.8, this works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.