Last active
December 14, 2024 03:07
-
-
Save mike-moreau/2e0802706e62e55c840ec97155317348 to your computer and use it in GitHub Desktop.
How to look up DNS from Terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Look up DNS records in Terminal - dig or nslookup | |
$ dig example.com ANY | |
$ host example.com | |
$ nslookup -type=any example.com | |
$ nslookup -type=A example.com | |
$ nslookup -type=CNAME example.com | |
$ nslookup -type=TXT example.com | |
$ nslookup -type=MX example.com | |
# Flush the DNS Cache on Mac OS | |
$ sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment