Sometimes you need to know the physical hardware address (aka MAC Address) of your network cards on Ubuntu or Debian Linux. Here are how to find it either in graphical way or by running command.
MAC Address, stands for media access control address, is a unique identifier assigned to a network interface controller for use as a network address in communications. Each network device has its own hardware address. Usually, desktop PC has only one MAC address for the wired network. While a notebook will have two: one for wireless card and another for the wired.
Find MAC Address in Ubuntu or Other Linux with GNOME Desktop:
For the Linux with GNOME Desktop, e.g., Ubuntu 18.04 +, Debian 11, Fedora Workstation, and CentOS 8, it’s easy to find it.
Firstly, go to upper-right corner system tray menu and click the option to open “Settings”.
If Wi-Fi connected, in the first tab click on the “gear” icon after the connected network will open the information page.
Or, go to the “Network” in the left pane and click on the “gear” button for the wired network. You can find the Mac address even the cable is not plugged.
Finally, you’ll see the “Hardware Address” (aka Mac address) in the pop-up dialog for either WiFi or Wired network, depends on which button you clicked. In my case, the address is “AC:E2:D3:6D:7A:AC”.
Find MAC Address via single command (Universal way):
For other Desktop or all Linux server, there are a few commands to tell the hardware address.
Without installing anything, the built-in
ip command line tool can tell the info via:
It will output something look like:
merilyn@focal:~$ ip link 1: lo:
mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno1: mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000 link/ether ac:e2:d3:6d:7a:ac brd ff:ff:ff:ff:ff:ff altname enp2s0 3: wlo1: mtu 1500 qdisc noqueue state UP mode DORMANT group default qlen 1000 link/ether 40:9f:38:ee:52:7d brd ff:ff:ff:ff:ff:ff altname wlp3s0
Usually, the wireless device is one of “wlan0, wlan1, wlan2, wlo0, wlo1, wlo2” while the wired device name is “eth0“, “eth1“, “eno0“, or “eno1” depends on your machine.
And the addresses behind “link/ether” in the output are what you want to find:
Similar to Microsoft Windows “ipconfig“, Linux also has “ifconfig” command to do the similar job. However, it is not pre-installed out-of-the-box in some Linux. So, you may first install the tool via command:
sudo apt install net-tools
And then run it to tell the info:
That’s all. Enjoy!