Guides / Find your MAC address

How to find your MAC address on Linux

One command works on every distribution. The desktop settings are there too if you would rather click.

Short answer

Open a terminal and run ip link . Each interface is listed with its MAC address after link/ether.

Terminal

ip

  1. Open a terminal. On most desktops Ctrl + Alt + T does it.
  2. Run ip link .
  3. Find your interface. Wi-Fi is usually named wlan0 or something like wlp3s0 , and wired is eth0 or enp2s0 .
  4. The MAC address is the value after link/ether on the line below it.

nmcli

  1. Run nmcli device show .
  2. Each device has a GENERAL.HWADDR line with its MAC address. Add the interface name, as in nmcli device show wlan0 , to see just one.

sysfs

The kernel also exposes the address as a file. cat /sys/class/net/wlan0/address prints it and nothing else, which is handy in scripts.

Note: All three show the address the interface is using right now. If something has changed it, see the last section. The old ifconfig command still works if the net-tools package is installed, but ip replaced it years ago.

GNOME Settings (Ubuntu, Fedora and others)

  1. Open the Activities overview and start typing Wi-Fi, or Network for a wired connection.
  2. Click Wi-Fi or Network to open the panel.
  3. Click the gear button next to the active connection.
  4. The MAC address is listed as Hardware Address on the Details tab.

KDE Plasma

  1. Click the network icon in the system tray.
  2. Click your connection to expand it.
  3. Open the Details tab. The MAC address is listed there.
Note: KDE does not document this screen, so if your version looks different, the terminal commands above work regardless.

Why the address your router sees might be different

NetworkManager can hand a Wi-Fi network a different address from the one on the hardware. The setting is wifi.cloned-mac-address. Out of the box it is set to preserve, which leaves the address alone, but some distributions set it to random or stable so that networks cannot track the laptop. Scanning for networks already uses a random address by default. A randomized address is locally administered, so a lookup on our home page will say so instead of naming the maker.

To check a connection

  1. Run nmcli connection show to list your connections by name.
  2. Run nmcli connection show "Home Wi-Fi" | grep cloned-mac-address , with your connection's name.
  3. Empty, preserve or permanent means the hardware address is used. random, stable or stable-ssid means a made-up one is.

To use the hardware address on a network

Run nmcli connection modify "Home Wi-Fi" wifi.cloned-mac-address permanent and reconnect.

Note: The full list of values is in the NetworkManager settings reference .

These steps follow GNOME's and NetworkManager's documentation .