Linux - How to find dns records using host command , Linux host command to get DNS records

How to find dns records using host command

Linux host command

Using "host" command we shall easily get the DNS Records - MX, CNAME, A - of a domain. host commands are often used by network or linux admins to find the DNS record's. In normal the dig command is used by most of the Linux admins to find the DNS record. In simple Linux "host" command can be used to print the required DNS record. we can get the required DNS record by using the -t option.

To get the A record
   # host -t a w3calculator.com

   Output:
   -------  
   w3calculator.com has address 174.133.12.202

To get the CNAME record
   # host -t cname www.w3calculator.com

   Output:
   -------  
   www.w3calculator.com is an alias for w3calculator.com.

To get the MX record
   # host -t MX w3calculator.com

   Output:
   -------  
   w3calculator.com mail is handled by 0 mail.w3calculator.com.

To get the SOA
   # host -t SOA w3calculator.com

   Output:
   -------  
   w3calculator.com has SOA record ns1.math.com.

To get the nameserver, NS record
   #  host -t ns w3calculator.com

      Output:
      -------  
      w3calculator.com name server ns2.math.com.
      w3calculator.com name server ns1.math.com.

The topic on Linux - How to find dns records using host command is posted by - Math

Hope you have enjoyed, Linux - How to find dns records using host command Thanks for your time

Tech Bluff