As some have commented, ifconfig
is deprecated in favor of the ip
command. So combining the various solutions and comments, I'd use:
$ LANG=C ip link show | awk '/link\/ether/ {print $2}'FF:FF:FF:FF:FF:FF
As some have commented, ifconfig
is deprecated in favor of the ip
command. So combining the various solutions and comments, I'd use:
$ LANG=C ip link show | awk '/link\/ether/ {print $2}'FF:FF:FF:FF:FF:FF