Instantly share code, notes, and snippets.
Method 1
ifconfig | grep -Po 'ether \s*\K\S*'
Method 2
cat /sys/class/net/eth0/address