How to Find a Mac Address in Linux

In those days, when only Ethernet was designed, the use of a unique number for each network card connected to it was envisaged. He was appointed at the manufacturing state of the board. The MAC address is used to determine the recipient and the sender of information on the Web. And in this article, we will talk about how to find the MAC address in Linux.

Almost all operating systems based on the Linux kernel uses two console utilities, with which you can find out the hardware address of the board: ifconfig and ip.

FIND A MAC ADDRESS WITH IFCONFIG

One of the first network programs in the history of Linux is ifconfig. In some distributions, it runs only on behalf of the administrator and somewhere is not installed at all. Consider its installation and use in Manjaro Linux. A package containing some network utilities (including ifconfig) in Manjaro– and Arch-like systems is called net-tools. Below described how to install it.

sudo pacman -S net-tools

And in Ubuntu– and Debian-like systems:

sudo apt install net-tools

To check the MAC address of Linux, first look at the list of interfaces:

ifconfig

There are two available interfaces: enp0s3 (in your case it can be called differently) and lo (it’s also a local host, which is the same for almost all computers). We need enp0s3. The MAC address of the device is already visible in the ether field.

How to see a Mac Address with IP

Newer on GNU / Linux systems (relative to ifconfig) is the ip program. Its principle of operation is almost the same. It differs in syntax and output information. And it is installed by default for all systems. To display network interfaces, enter the following command:

ip a

Here lo and enp0s3 are arranged in the reverse order.

To find the MAC address in Linux, there are two console utilities – ifconfig and ip. The first can be run as administrator on some distributions (for example in Debian), but somewhere not to be installed (Manjaro). This is due to its retreat into the background since ip is a newer program and is installed by default on all systems.

Abdelrahman Reda

Abdelrahman Reda is a Motivated Support Engineer with 6+ years of corporate and consumer support experience. His experience related to administration of Network, NOC support, computers and anti-virus server, data entry, networking sites, remote support.

You may also like...