Why Do You Need a MAC Address?
Every network interface on your computer—whether it is a physical Ethernet port or a Wi-Fi adapter—has a unique hardware identifier called a Media Access Control (MAC) address. Unlike an IP address, which is assigned by your router and can change frequently, the MAC address is permanently burned into the hardware. You will often need to find your MAC address if you are setting up a secure network that utilizes MAC filtering (whitelisting specific devices), configuring a static DHCP lease on your router, or troubleshooting complex network connectivity issues in Ubuntu Linux.
Using the ip link Command
In older versions of Ubuntu, the standard command for finding network information was ifconfig. However, this command is now deprecated and often not installed by default on modern Linux distributions. The modern, more powerful replacement is the ip command suite.
- Open your Terminal application (Ctrl + Alt + T).
- To view the details of all network interfaces on your system, type the following command and press Enter:
ip link
How to Read the Output
The terminal will output a block of text containing technical data for every interface on your machine.
- First, identify the interface you want to check. You will likely see:
lo: This is the local loopback interface (ignore this).enp...oreth...: This represents your physical wired Ethernet connection.wlp...orwlan...: This represents your wireless Wi-Fi adapter.
- Once you have located the correct interface block (e.g.,
wlp3s0), look at the second line of text directly beneath it. - You will see the word link/ether followed by a sequence of six pairs of alphanumeric characters separated by colons (e.g.,
a1:b2:c3:d4:e5:f6). - This 12-character sequence is your exact MAC address.
Alternative Method: Using the Graphical Interface
If you prefer not to use the terminal, you can also find this information using the standard Ubuntu Settings app.
- Open the Settings app.
- In the left-hand sidebar, click on either Wi-Fi or Network (depending on your connection type).
- Click the Settings gear icon next to your active network connection.
- In the Details tab of the window that appears, look for the field labeled Hardware Address. This is your MAC address.