host Linux Commands

What is Linux host Command?



host command is used to find the ip address of the given domain name and also prints the domain name for the given ip.


host [-aCdlnrTwv] domain-name/ipaddress


-a Prints all the DNS records for the given hostname.
-C Prints the SOA records and authorative name servers.
-d It is equivalent to -v.
-l Lists all hosts in a domain using AXFR.
-t used to select the query type.
Query Type: CNAME,NS,SOA,KEY etc,.
-W Specifies how long to wait for a reply.
-v Verbose output is generated by host.
-T Use TCP instead of UDP to query nameserver. This is implied in queries that require TCP, such as AXFR requests.


  1. To find the ipaddress of a hostname
    host has address

    By typing the hostname along with the host command you can get its ipaddress. The ip address of is
  2. To Print SOA record information:
    host -C
    Nameserver SOA
    2007062001 86400 7200 3600000 86400 Nameserver SOA
    2007062001 86400 7200 3600000 86400

    The above cmd prints the host's nameserver and its SOA record.

Ask Questions

Ask Question