3 Ways to Find MAC Address In Linux

Updated: Jul 29

How to list MAC address on Linux is a commonly asked question during a Linux job interview. Here are 3 methods to get the MAC address. These commands are safe to run without changing anything.

  1. Find MAC address on Linux with ifconfig

  2. Get MAC address with ip link show

  3. Find MAC address from /sys


What is MAC address?


A MAC address is the unique identifier that is assigned by the manufacturer to a piece of network hardware (like a wireless card or an ethernet card). MAC stands for Media Access Control, and each identifier is intended to be unique to a particular device.


A MAC address consists of six sets of two characters, each separated by a colon. 00:1B:44:11:3A:B7 is an example of a MAC address.



Find MAC address on Linux with ifconfig

# ifconfig -a

ens1f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 10.124.202.230 netmask 255.255.255.128 broadcast 10.124.202.255

ether 70:ca:9b:ce:67:ae txqueuelen 1000 (Ethernet)

RX packets 12187970 bytes 7390885300 (6.8 GiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 16813496 bytes 16253942714 (15.1 GiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device memory 0xb1960000-b197ffff



Get MAC address with ip link show

# ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> 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: ens1f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000

link/ether 70:ca:9b:ce:67:ae brd ff:ff:ff:ff:ff:ff



Find MAC address from /sys

# more /sys/class/net/ens1f0/address

70:ca:9b:ce:67:ae

Related Post:

Linux Commands: Check Network Status

Check network performance problems on the Linux system






9,235 views