Networking / Beginners

Common Lookup Tools

There are many command-line tools for looking up hostnames. The more common tools include the following:

host: The host command performs a simple hostname (or address) lookup. It returns all address information. For example, host www.google.com returns a list of IP addresses and hostname aliases used by Google. Different versions of the host command use different parameters. Some versions allow specifying a DNS server or returning other types of information beyond network addressing. (See dig.) In general, the host command performs the lookup but does not disclose where it performed the lookup-the user cannot distinguish a host file from a DNS access.

nslookup: The name server lookup tool provides an interactive interface for performing DNS queries. Unlike the host command, nslookup explicitly states the source of the resolution information. Users may also specify the DNS server for performing the lookup. Although useful, some operating systems consider nslookup to be obsolete and replace it with dig.

dig: The domain information groper (dig) is a powerful tool for performing hostname lookups. Unlike host or nslookup, dig displays all information from the entire DNS request. Although very informative, the cryptic output from dig is not intended for nontechnical users.
[Previous] [Contents] [Next]