LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-03-2014, 11:07 PM   #16
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Rep: Reputation: 39

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:

Code:
getent hosts <domain>
which follows the nsswitch order.
 
  


Reply

Tags
command, dig, host, nslookup, ping



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 12:27 AM
A script to thoroughly resolve a hostname into IP addresses ahz10 Programming 1 08-23-2006 04:40 PM
Unable to resolve hostname adirock2 Linux - Networking 14 07-06-2005 02:08 AM
windows does not resolve linux hostname abrb220 Linux - Networking 6 05-18-2004 04:11 AM
Cannot resolve hostname problem for IglooFTP smc_one Linux - Networking 0 08-18-2003 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 AM.

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