获取 mac地址

#  cat /sys/class/net/eth0/address
00:23:9e:ff:e1:1c

获取网线连接状态
# apt-get install ethtool
# ethtool eth0 | grep "Link detected:"
    Link detected: yes
如果没有接则显示为:
Link detected: no