Sometime, I would like to get only the mac address of the ethernet device. so here is the command line to do this.



ip addr show dev enp5s0 | grep "link/ether" | awk '{print $2}'

posted by citadel