

With the following command, we can get all the MAC address in the system.In a world where consumer-level computing technology has been largely dominated by Windows, many users remain unaware of the need for administrators to configure and maintain network hardware and environments based on the Linux operating system. We can get the MAC address from the file /sys/class/net/interface-name/address. Inet6 fe80::70:b1ff:feb1:34a1/64 scope linkĭirectory /sys allows us to get information about the system and its components (mostly attached and installed hardware) in a structured way.

Mostly this will be present in the second line.Ģ: eth0: mtu 9001 qdisc mq state UP group default qlen 1000 The MAC address is the link/ether field of the output. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0ĭevice memory 0xb1960000-b197ffff Get MAC address with ip link show in Ubuntu

On the latest Ubuntu version, this tool is no longer installed by default.

Ifconfig stands for “interface configuration.” It is used to view and change the configuration of the network interfaces on our system. The MAC address is a 12 digit hexadecimal number that is most often displayed with a colon or hypen separating every two digits (an octet), making it easier to read.Įxample: A MAC address of 2c549188c9e3 is typically displayed as 2C:54:91:88:C9:E3 or 2c-54-91-88-c9-e3. The MAC address is tied to the Network Interface Controller (NIC), a subcomponent of the larger device. MAC stands for Media Access Control, and each identifier is intended to be unique to a particular device.
