Get MAC address from file system

On Debian based Linux distributions you can get the MAC address of the respective network adapter from the filesystem like shown below: $> cat /sys/class/net/wlan0/address # WLAN adapter $> 81:82:83:4:85:86 $> cat /sys/class/net/eth0/address # LAN adapter $> 1a:1b:1c:1d:1e:1f As you can see, all adapters have their own folder under  /sys/class/net/ that contains  a address file with the corresponding MAC […]