Skip to content

Instantly share code, notes, and snippets.

@mike-moreau
Last active December 14, 2024 03:07
Show Gist options
  • Save mike-moreau/2e0802706e62e55c840ec97155317348 to your computer and use it in GitHub Desktop.
Save mike-moreau/2e0802706e62e55c840ec97155317348 to your computer and use it in GitHub Desktop.
How to look up DNS from Terminal
# 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