Where technology and gadgets come together and play

Linux Fix - Can Ping IP but can't Resolve Domain Name

Fix for unable to resolve domain names

Written By on in Linux

170 words, estimated reading time 1 minutes.

This quick fix for Linux helps when you get trouble resolving domain names in web browsers or unable to connect to servers to download updates or packages.

Domain names are a human-friendly version of IP addresses. The resolve process is a lookup between a name and an IP. For example, the IP address 172.217.17.68 resolves to www.google.com, and the domain name is far easier to remember than that long number.

On some Linux distributions, domain name resolving does not work out the box. Typically this is because a package isn't installed or a setup item wasn't completed properly. You may encounter errors such as:

Err:1 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 postfix amd64 3.1.0-3
  Temporary failure resolving 'gb.archive.ubuntu.com'

The fix is quite easy. All you need to do is edit a file and add in two lines which tell the networking system where to go to look up domain names.

sudo pico /etc/resolv.conf

If this file is empty then this is your problem. Simply add the following lines to the file, save and try to access the domain name again.

nameserver 8.8.8.8
nameserver 8.8.4.4

Now you should be in business.

Last updated on: Tuesday 29th August 2017

 

Comments

There are no comments for this post. Be the first!

 

Leave a Reply

Your email address will not be published.





If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Copyright © 2001-2018 Tim Trott, all rights reserved. Web Design by Azulia Designs

This web page is licensed for your personal, private, non-commercial use only.

Disclaimer, Privacy & LegalSitemapContact Me