How to Find Your MAC Address on Linux
If you are administering a Linux system, there will likely be times when you need to know your system’s MAC address. You may need this information for several reasons. Perhaps you want DHCP to assign you a fixed IP address. For this, you will need the MAC address so that you can add the IP and MAC address mapping to your DHCP server configurations.
You may also need this information for MAC address filtering to allow or block certain devices on your network. Or maybe you want to set up Wake-on-LAN. Whatever the reason is, here are a few different ways to find the MAC address on your Linux system.
What Is a MAC Address?
A MAC address, also known as a physical or hardware address, is a unique identifier associated with anetwork interface cardof pretty much every device connected to a network.
MAC address functions at the second layer (Data Link layer) ofthe OSI modeland is 48 bits in length, where the first 24 bits represent the manufacturer ID and the last 24 bits represent the unique ID for that NIC. Like IP addresses, you can alsochange the MAC address of your NIC.

Find the MAC Address on Linux via the Command Line
Here are a few quickest and easiest methods to find your MAC address on Linux:
Using the ip Command
You can use the ip command in Linux to view and configure physical as well as virtual network interfaces, routing, policy routing, and tunnels. It can add or delete a network interface, assign/remove IP addresses, display the status of network interfaces, and perform much more useful tasks.
You can find the MAC address of your system using the following ip command:

This command shows the details of all the network interfaces including their MAC addresses besides the labellink/etheras highlighted below:
To find the MAC address of a particular network interface, use the following syntax:

Using the ifconfig Command
The ifconfig command in Linux allows you to configure and display the status of network interfaces. Moreover, it can also activate and deactivate a network interface.
To find the MAC address of all the available network interfaces (even if they are deactivated), use the ifconfig command with the-aflag as follows:

To find the MAC address of a particular network interface, specify its name as an argument:
To find the MAC address of all the currently active network interfaces, use the ifconfig command without any flag:
In the output, you’re able to find the MAC address of your interface beside the labeletheras highlighted below:
Using the ethtool Utility
ethtool is a Linux utility that allows you to query and configure network drivers and network interface card settings. Using the ethtool utility, you may also query a network interface for its MAC address.
Here’s the command to do so:
Get MAC Address From the /sys/class/net Directory
The/sys/class/netdirectory contains information about the network devices attached to the system. This directory maintains a separate subdirectory for each of the network interfaces like/sys/class/net/ens33and/sys/class/net /ens37.
Each subdirectory contains different files for each network attribute like MAC address, the operational state of the network device, its duplex, MTU, etc. The MAC address information is stored in theaddressfile.
To list the network interfaces attached to your system, use the following command:
To find the MAC address of a particular network interface, use the following command syntax:
For instance, to find the MAC address of a network interface, let’s sayens33, the command would be:
How to Find the MAC Address on Linux via GUI
Those who prefer GUI for their routine tasks can find their MAC address graphically using the network manager provided by their distribution. Like in Ubuntu, you can use the Network Connections settings.
OpenSettingsin your Linux distribution either by right-clicking on your desktop or from the applications menu. From the left panel, go to theNetworktab. This will display all the network interfaces attached to your system.
To find the MAC address of a network interface, click theCog(settings) icon in front of it.
This will open a new window showing the details of your network interface. Here you will find the MAC address beside the labelHardware Address.
For this guide, we’ve used GNOME for the images, but other desktop environments would also have similar settings, only with different labels.
Find the MAC Address of Another System on a Local Network
Similar to your own MAC address, you can also find the MAC address of other systems on a local network. Here’s how:
Using the arp Command
You can use ARP, or Address Resolution Protocol, to learn the MAC address for a given IP address. To find the MAC address of another system on a local network, ping its IP address with:
The ping command will use ARP to learn the MAC address of the remote system. Once it gets this information, it’s stored in the ARP table, which you can view using:
This command will print the MAC address for the given IP address.
Using the arping Utility
The arping utility helps you discover and probe local systems on a network. It functions at the second layer in the OSI model and sends the ARP request to the system to determine whether it is alive and responding. It is different from the ping utility which functions at the third layer.
you’re able to install arping using the following commands:
On Debian-based distributions:
On RHEL-based distributions:
Once installed, find the MAC address of another system on a network by specifying its IP address as an argument using the following command:
If your system has multiple NICs, you can specify from which interface a request should be sent using the-Iflag (capital “i”) followed by the interface name:
For instance, the following command will send one ARP request from itsens33interface to the remote system’s IP address192.168.42.133.
In the output, you will receive the ARP reply from the destination system containing its MAC address.
It’s Easy to Find Your MAC Address on Linux
Given the various methods of finding the MAC address on Linux, you can pick and choose any one that you find convenient.
Similar to Linux, you can also find the MAC address in Windows and macOS; however, they have different sets of commands and GUI.
It can be tricky to find your MAC address on a Windows 10 PC, but you can simplify the process. Here’s how to find your MAC address.
If an AI can roast you, it can also prep you for emergencies.
Freeing up vital memory on Windows only takes a moment, and your computer will feel much faster once you’re done.
The key is not to spook your friends with over-the-top shenanigans.
You can block out the constant surveillance and restore your privacy with a few quick changes.
Obsidian finally feels complete.