To look up DNS on a Linux or Unix system, you can use the dig
utility.
To look up the DNS record for a domain, run the following command:
dig <domain>
Replace <domain>
with the domain you want to look up.
This will display the DNS record for the specified domain.
By default, dig
will look up the A record for the domain. To look up a different record, use the -t
option followed by the type of record you want to look up. For example, to look up the MX record for a domain, run the following command:
dig -t MX <domain>
To look up the DNS record for a domain using a specific DNS server, use the @
symbol followed by the DNS server's IP address. For example, to look up the DNS record for a domain using the Google DNS server (8.8.8.8), run the following command:
dig @8.8.8.8 <domain>
That's it! You now know how to look up DNS on a Linux or Unix system.