Get your MAC address with the command AWK under Ubuntu

December 2016


Get your MAC address with the command AWK under Ubuntu





With this command line you can easily retrieve the address MAC of your NIC.

$ Ifconfig | awk '/ ^ eth0 / {print $ 5}'


A definition is needed on the term MAC address: this is a physical address of a network interface specified by the manufacturer which can uniquely identify a machine on a LAN.

The MAC address is a unique physical ID cards for all networks worldwide. It is registered permanently in ROM at the Factory.

Related :

This document entitled « Get your MAC address with the command AWK under Ubuntu » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.