← All commands
Topic hub Networking
Windows Linux Networking Expanded guide

Windows Resolve-DnsName equivalent in Linux

Looks up DNS records such as A, AAAA, MX, TXT and NS entries.

Windows Resolve-DnsName
→
Linux equivalents
Debian/Ubuntu same command
dig example.com
Fedora same command
dig example.com
Arch same command
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.

Migration tip: <code>dig</code> provides detailed DNS diagnostics. Add <code>+short</code> when you only need the resolved value.

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.

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 optionUse
dig example.comQuery the default record type
dig +short example.com AShow only IPv4 addresses
dig example.com MXQuery 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related Networking commands