Tuesday, August 10, 2010

Resolving a hostname (DNS lookup)

A hostname can be resolved to an IP address via DNS with the nslookup command:

    nslookup example.com

The output identifies the address of the server:

    Server:         161.44.124.122
    Address:        161.44.124.122#53

The file /etc/resolv.conf is used to configure name servers.