host google.com

host - DNS lookup utility

host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command line arguments and options.
Sample Output
google.com has address 74.125.67.100
google.com has address 209.85.171.100
google.com has address 74.125.45.100
google.com mail is handled by 10 smtp2.google.com.
google.com mail is handled by 10 smtp3.google.com.
google.com mail is handled by 10 smtp4.google.com.
google.com mail is handled by 10 smtp1.google.com.

1
By: tommaso
2009-03-24 16:25:12

These Might Interest You

  • Performs a reverse DNS lookup, variants include: nslookup 74.125.45.100 or: host 74.125.45.100 Show Sample Output


    4
    dig -x 74.125.45.100
    postrational · 2009-09-28 15:13:34 0
  • mtr is a network utility that combines traceroute and ping utility


    -1
    mtr -c 50 -r example.com
    ohe · 2015-08-05 07:18:52 1
  • host -i `echo $SSH_CLIENT | cut -f 1 -d \ ` | sed 's/.* domain name pointer \(.*\)\./\1/' to reverse lookup and get the hostname.


    0
    echo $SSH_CLIENT | cut -f 1 -d ' '
    infinull · 2011-01-11 10:20:45 1
  • Short and concise output appropiate for scripts. Show Sample Output


    0
    getent hosts <host>
    lulingar · 2014-08-19 13:54:56 0
  • From the man page. lft ? display the route packets take to a network host/socket using one of several layer-4 protocols and methods; optionally show heuristic network information in transitu -A Enable lookup and display of of AS (autonomous system) numbers (e.g., [1]). This option queries one of several whois servers (see options 'C' and 'r') in order to ascertain the origin ASN of the IP address in question. By default, LFT uses the pWhoIs service whose ASN data tends to be more accurate and more timely than using the RADB as it is derived from the Internet's global routing table. -N Enable lookup and display of network or AS names (e.g., [GNTY-NETBLK-4]). This option queries Prefix WhoIs, RIPE NCC, or the RADB (as requested). In the case of Prefix WhoIs or RADB, the network name is displayed. In the case of RIPE NCC, the AS name is displayed. Show Sample Output


    3
    lft -NAS google.com
    tulio · 2011-04-04 03:07:00 0

  • 0
    dig +short -x 127.0.0.1
    encoded · 2014-08-07 20:42:50 0

What Others Think

#dig google.com
DNSpyder · 478 weeks and 1 day ago
dig google.com
DNSpyder · 478 weeks and 1 day ago
nslookup google.com
P17 · 478 weeks and 1 day ago
the host command returns the mx record...
defan21 · 477 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: