3 Ways to Find MAC Address In Linux

Updated: Feb 7

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.

Find MAC address on Linux with ifconfig

# ifconfig -a

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

inet netmask broadcast

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 addres 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


Related Post:


Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.


✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.