ifconfig -a | grep eth0 | awk -F ' ' '{print $5}' | sed 's/://g'
Linux 获取 MAC 地址并去除 : 字符
原文:https://www.cnblogs.com/chenfulin5/p/8875221.html