Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-04-2014, 12:07 AM   #16
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: PCLinuxOS 2010.12, Debian Lenny
Posts: 396

Rep: Reputation: 38

Using ping still seems a way to resolve a hostname, following the systems nsswitch.conf order. That is, checking hosts file first. dig, nslookup and host command all go straight to DNS and bypass hosts file.

Another command for this is:

getent hosts <domain>
which follows the nsswitch order.


command, dig, host, nslookup, ping

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve hostname linuxtesting2 Solaris / OpenSolaris 5 03-20-2007 01:27 AM
A script to thoroughly resolve a hostname into IP addresses ahz10 Programming 1 08-23-2006 05:40 PM
Unable to resolve hostname adirock2 Linux - Networking 14 07-06-2005 03:08 AM
windows does not resolve linux hostname abrb220 Linux - Networking 6 05-18-2004 05:11 AM
Cannot resolve hostname problem for IglooFTP smc_one Linux - Networking 0 08-18-2003 11:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration