Quantcast
Channel: Output only MAC address on Ubuntu - Ask Ubuntu
Viewing all articles
Browse latest Browse all 9

Answer by muru for Output only MAC address on Ubuntu

$
0
0

You can access the address file for each device on the /sys virtual filesystem. The MAC address should be in /sys/class/net/<device-name>/address:

$ cat /sys/class/net/enp1s0/address34:17:eb:5d:88:7c

For all devices:

$ cat /sys/class/net/*/address34:17:eb:5d:88:7c00:00:00:00:00:0064:5a:04:69:50:45

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>