DNS Commands

Cards (23)

  • dig command stands for Domain Information Groper. It is used for retrieving information about DNS name servers. It is basically used by network administrators. It is used for verifying and troubleshooting DNS problems and to perform DNS lookups. Dig command replaces older tools such as nslookup and the host.
  • host command in the Linux system is used for DNS (Domain Name System) lookup operations. In simple words, this command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy. You can also find more specific details of a domain by specifying the corresponding option along with the domain name.
  • dig Command:
    To query domain “A” record -> dig domainname.com
  • dig Command:
    To query domain “MX” record -> dig domainname.com MX
  • dig Command:
    To query domain “NS” record -> dig domainname.com NS
  • dig Command:
    To query domain “TXT” record -> dig domainname.com TXT
  • dig Command:
    To query domain “CNAME” record -> dig domainname.com CNAME
  • dig Command:
    To query domain “SRV” record -> dig _sip.tls.domainname.com SRV
  • dig Command:
    To query domain “AAAA” record -> dig domainname.com AAAA
  • dig Command:
    To query domain “CAA” record -> dig domainname.com CAA
  • dig Command:
    To query all records of a domain -> dig domainname.com ANY
  • dig Command:
    To query domain records from a different server -> dig domainname.com 8.8.8.8
  • dig Command:
    Reverse lookup of an IP -> dig -x IP_address
  • host Command:
    To find IP Address and MX record -> host domainname.com
  • host Command:
    To display the domain details of the specified IP Address -> host IP_Address
  • host Command:
    To find IPv4 -> host -t A domainname.com
  • host Command:
    To find IPv6 -> host -t AAAA domainname.com
  • host Command:
    To find mail records -> host -t MX domainname.com
  • host Command:
    To find Name Server -> host -t NS domainname.com
  • host Command:
    To find TXT Record -> host -t TXT domainname.com
  • host Command:
    To find Service Records -> host -t SRV domainname.com
  • host Command:
    To find CAA Record -> host -t type257 domainname.com
  • host Command:
    To find all records of the domain -> host -t ANY domainname.com