CentOS7获取网卡Mac地址

2018-12-10  本文已影响0人  道圣科技

CentOS7获取网卡Mac地址

查看网络配置,执行命令:# ifconfig -a

image

执行命令:# ifconfig enp2s0 | egrep "ether"

image

最终获取到Mac地址,执行命令:# ifconfig enp2s0 |egrep "ether" |awk '{print $2}'

image
上一篇 下一篇

猜你喜欢

热点阅读