← All commands
Topic hub Networking
Windows Linux Networking DNS

Windows Resolve-DnsName -Type MX equivalent in Linux

Looks up mail-exchanger DNS records.

Windows Resolve-DnsName -Type MX
Linux equivalents
Debian/Ubuntu apt package: dnsutils
dig MX example.com
Fedora dnf package: bind-utils
dig MX example.com
Arch pacman package: bind
dig MX example.com

Overview

What this command does

Looks up mail-exchanger DNS records.

Migration tip: Check the distro-specific rows before copying; package names and service names can differ even when the tool name is similar.

Practical tasks

Common use cases

Query MX records

Looks up mail-exchanger DNS records.

dig MX example.com

Query MX records

dig --help

Show command help when supported

man dig

Open the manual page when installed

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

dig MX example.com

Walkthrough

Examples with explanations

# Windows equivalent: Resolve-DnsName -Type MX
dig MX example.com

Reference

Common options and variations

Command or optionUse
dig MX example.comQuery MX records
dig --helpShow command help when supported
man digOpen the manual page when installed

Distro differences

Debian/Ubuntu vs Fedora vs Arch

The equivalent is shown for Debian/Ubuntu, Fedora and Arch. Some rows use a different package manager or helper tool where Linux distributions commonly diverge.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu apt package: dnsutils dig MX example.com Same command on this distribution.
Fedora dnf package: bind-utils dig MX example.com Same command on this distribution.
Arch pacman package: bind dig MX example.com Same command on this distribution.

Keep learning

Related Networking commands