How to Find MAC Address in Ubuntu

The Hardware Telemetry Interrogation

While an IP address is a volatile, logical coordinate assigned dynamically by a network router, the Media Access Control (MAC) address is a permanent, cryptographic hexadecimal string physically burned into the silicon of your server’s Network Interface Card (NIC) at the factory. If you are operating a headless Ubuntu server and need to configure a strict, MAC-based firewall rule on a Cisco switch, or reserve a permanent static IP address within your DHCP daemon, the logical IP is useless. You must interrogate the Linux kernel to extract the absolute, unchangeable hardware identifier (e.g., `00:1A:2B:3C:4D:5E`).

How to Find MAC Address in Ubuntu

The UNIX architecture deprecated the legacy `ifconfig` utility. You must utilize the modernized, highly integrated `ip` routing command to parse the network hardware registry.

1. Open your terminal application or connect to the server via SSH.
2. Method 1: The Modern Standard (The `ip link` Command):
* This is the fastest and most mathematically precise execution pathway, natively built into all modern Ubuntu kernels.
* Type exactly:
ip link show
* Press Enter.
* The Diagnostic Dump: The terminal will output a dense block of telemetry data for every active hardware interface.
* The Target Acquisition: Ignore the `lo` (loopback) interface. Look for the alphanumeric block associated with your physical hardware (e.g., `eth0` or `enp3s0` for Ethernet, `wlan0` for Wi-Fi).
* Within that specific block, look for the line beginning with the string link/ether. The six-part hexadecimal sequence immediately following it (e.g., `52:54:00:a1:b2:c3`) is your exact MAC address.
3. Method 2: The Detailed Extraction (The `ip addr` Command):
* If you need to view your logical IP address and your hardware MAC address simultaneously.
* Type exactly:
ip a
* Press Enter.
* The output is more verbose, but the exact same `link/ether` string will be visible under your primary network interface block.
4. Method 3: The Raw System File Interrogation (`cat`):
* If you want to bypass the routing utilities entirely and extract the raw hexadecimal string directly from the core `sysfs` virtual file system.
* You must know the exact name of your interface (e.g., `enp3s0`).
* Type exactly:
cat /sys/class/net/enp3s0/address
* Press Enter. The kernel will output a single, sterile line of text containing only the MAC address string.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.