How to be sure the dns service is running ?

Well, i changed my lan card and finally i got it up and running, i have /etc/resolv.conf with
domain xxx.xxx
nameserver xxx.xxx.xxx.xxx
and it was working with me earlier with the old lan card, with the new one i added it ip using auto-dhcp and its received an ip from my dhcp and it can ping the other machines fine, also i added router to it using route add default and its worked fine too, the problem which i faced (and which i faced before too) its dont resolve the dns name, like if i ping yahoo.com its telling me unknonwn host this problem fixed with restart but im asking which service related to that so i can restart instead of reboot the whole machine? thanks

hello,

do you mean your machine run a DNS server service or act as DNS client?
if your machine act as DNS client only - you should check the nsswitch.conf and nsswitch.dns :

grep hosts /etc/nsswitch.conf
grep hosts /etc/nsswitch.dns

add the following word "dns" :

hosts : dns <space_bar> files

after that, try to ping other hosts.

cheers,

Thanks man i added hosts files dns to my nsswitch.conf and its worked fine, but im still intrested in know which service running related to dns client so that i can kill and re start it to be sure of that any changes i made is updated.

So there is no daemon for dns resolving ? is it in the kernal or what ?!

The resolv.conf tells the resolver library functions how names should be resolved. It is read the first time a process calls any of the resolver functions.