How to use dig

When you know the name of a particular host, and you want to find the IP address that corresponds to it, ping the host in question; this will output the IP address of the host in parenthesis.

You can also use dig, the "domain information groper" tool. Give a hostname as an argument to output information about that host, including its IP address in a section labelled `ANSWER SECTION'.

To find the IP address of the host linart.net, type:

$ dig linart.net RET
...output messages...
;; ANSWER SECTION:
linart.net. 1D IN A 64.240.156.195
...output messages...
$
In this example, dig output the IP address of 64.240.156.195 as the IP address for the host linart.net.

Posted on: 17/12/2009








0 Comments
If you want to leave a comment please Login or Register