Windows getmac equivalent in Linux
Shows the hardware (MAC) address of each network interface card.
getmac
ip link show
ip link show
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.
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.
For the broader concept behind this mapping, read Linux networking for Windows users.
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 option | Use |
|---|---|
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 |
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.
| Distribution | Package manager / base | Equivalent command | Difference 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