Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I type in "google.com," firefox tells me that the server is not found. When I type in the IP address of google, it works just fine.

I was playing with this computer at another place and it didn't have any problems.

I have no idea what's wrong.

Also: this is a fresh install and the computer is a little old.

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

The configuration file /etc/resolv.conf contains information that allows a computer connected to a network to resolve names into addresses.

Change it to:

nameserver 8.8.8.8
nameserver 8.8.4.4

Also check that your dhclient is activated.

share|improve this answer
    
Just curious: what gave it away? What caused it? –  anonymous May 21 '12 at 4:22
    
It's the first thing to check, after basic network connectivity, when diagnosing DNS resolution problems. The fact you were "playing with this computer at another place" without problems suggests a misconfigured DNS resolver, which is done in /etc/resolv.conf on UNIX-like systems. It's likely that previously, the machine was configured to use a private DNS resolver only available to machines on a specific network. –  D_Bye May 21 '12 at 9:21
    
Remember if the machine is configured to use DHCP, resolv.conf may well get replaced at the next reboot. You need to make sure DHCP (if in use) is configured correctly, and your local DHCP server (usually your cable / adsl modem) is handing out the right details. –  EightBitTony May 21 '12 at 21:58
    
8.8.8.8 is the Google public name server. 8.8.4.4 is the secondary. You should probably add both. –  Swiss May 22 '12 at 5:41
    
thanks @Swiss and 2 –  Efazati May 22 '12 at 13:08
add comment

Your problem sounds like a case of not having the DNS server set. Normally, you would want to edit /etc/resolv.conf, but in Debian (and Ubuntu) this file could be overwritten. The official solution to this is to install the resolvconf package: apt-get install resolvconf

Then edit (with root permissions) either /etc/resolvconf/resolv.conf.d/head or /etc/resolvconf/resolv.conf.d/tail adding

nameserver 8.8.8.8
nameserver 8.8.4.4

and then run resolvconf -u to update the file. This will keep your changes from being overwritten.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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