← All commands
Topic hub Networking
Windows Linux Networking Expanded guide

Windows getmac equivalent in Linux

Shows the hardware (MAC) address of each network interface card.

Windows getmac
→
Linux equivalents
Debian/Ubuntu same command
ip link show
Fedora same command
ip link show
Arch same command
ip link show

Overview

What this command does

On Windows, "getmac" is used to display MAC addresses of network interfaces. On Linux, the closest practical mapping shown here is "ip link show". Shows the hardware (MAC) address of each network interface card. This reference is grouped under Networking.

Migration tip: MAC addresses appear in <code>ip link show</code> on the line starting with <code>link/ether</code>. Each network interface has its own unique MAC address.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows getmac maps to ip link show 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

Display MAC addresses of network interfaces

Shows the hardware (MAC) address of each network interface card.

ip link show

Show all interfaces with MAC addresses

ip link show eth0

MAC address of specific interface

cat /sys/class/net/eth0/address

Direct MAC address from kernel

Ready to run

Copyable Linux commands

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

ip link show
cat /sys/class/net/eth0/address

Walkthrough

Examples with explanations

# Windows: getmac /v
ip link show
2: eth0: <BROADCAST,MULTICAST,UP>
    link/ether aa:bb:cc:dd:ee:ff

# Just the MAC address:
cat /sys/class/net/eth0/address
aa:bb:cc:dd:ee:ff

Reference

Common options and variations

Command or optionUse
ip link showShow all interfaces with MAC addresses
ip link show eth0MAC address of specific interface
cat /sys/class/net/eth0/addressDirect MAC address from kernel
ip link | grep 'link/ether'All MACs in one line each

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "ip link show" 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 ip link show Same command on this distribution.
Fedora same command ip link show Same command on this distribution.
Arch same command ip link show Same command on this distribution.

Keep learning

Related Networking commands