Windows Resolve-DnsName equivalent in Linux
Looks up DNS records such as A, AAAA, MX, TXT and NS entries.
Resolve-DnsName
dig example.com
dig example.com
dig example.com
Overview
What this command does
On Windows, "Resolve-DnsName" is used to query DNS records. On Linux, the closest practical mapping shown here is "dig example.com". Looks up DNS records such as A, AAAA, MX, TXT and NS entries. This reference is grouped under Networking.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows Resolve-DnsName maps to dig example.com for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux networking for Windows users.
Practical tasks
Common use cases
Query DNS records
Looks up DNS records such as A, AAAA, MX, TXT and NS entries.
dig example.com
Query the default record type
dig +short example.com A
Show only IPv4 addresses
dig example.com MX
Query mail-exchanger records
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
dig example.com
dig +short example.com A
dig example.com MX
Walkthrough
Examples with explanations
dig example.com # perform a DNS lookup
dig +short example.com A # show only IPv4 answers
dig example.com MX # query MX records
Reference
Common options and variations
| Command or option | Use |
|---|---|
dig example.com | Query the default record type |
dig +short example.com A | Show only IPv4 addresses |
dig example.com MX | Query mail-exchanger records |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "dig example.com" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | dig example.com |
Same command on this distribution. |
| Fedora | same command | dig example.com |
Same command on this distribution. |
| Arch | same command | dig example.com |
Same command on this distribution. |
Keep learning