Ask Your Question

/etc/resolv.conf doesnt work

asked 2012-12-15 09:46:03 -0600

czkz6a gravatar image

hello, i have problem with my fedoras virtual machine. I installed fedora with ip from dhcp and i have changed ip to static. After this fedora cant resolve host names. I have tried to put google dns ip to /etc/resolv.conf but this dosnt work. Still the same.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-15 10:46:30 -0600

xconspirisist gravatar image

updated 2012-12-15 10:48:35 -0600

The correct syntax for /etc/resolv.conf is:

nameserver x.x.x.x

Where "x.x.x.x" is the IP address of your nameserver. You should test this nameserver first. Lets assume your nameserver is "":

1: Ping it, to check that you can reach it.


You should see responses like this;

64 bytes from icmp_req=1 ttl=64 time=0.612 ms

Press Ctrl+C to cancel the ping.

2: Now check DNS is running on that server:


This should give you a response like;


This validates your dns configuration. Some applications, espeically Firefox and Google Chrome will cache your DNS servers, so it may be necessary to restart them to pick up changes to DNS servers.

Your changes may be overwritten by NetworkManager - which is on by default. You may find configuration of DNS servers is easier by using a graphical tool, rather than editing /etc/resolv.cof manually.

edit flag offensive delete link more



bonus points if you use dig instead of nslookup!

randomuser gravatar imagerandomuser ( 2012-12-16 00:59:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-15 09:46:03 -0600

Seen: 4,010 times

Last updated: Dec 15 '12