Search for a device by mac address terminal

broken image
broken image

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 This will result in output similar to : eth0 Link encap:Ethernet HWaddr c7:35:ce:fd:8e:a1 You should swap # for the interface name. You can then use the following command : cat /sys/class/net/#/ address The name will be one of the displayed sub-directories alongside “lo”. You can find the interface names by using : ls /sys/class/net/ The first WiFi interfaces is still named “wlan0”. This means the Ethernet interface name is unique for every Pi. The Ethernet interface used to be called “eth0” but in newer versions of Raspbian it may be “enx#” where # is the MAC address. To find the MAC address from the command line you need to know the name of the interface. Below are some quick examples you can use to find the MAC address. There are a number of ways to identify them using the command line or using Python code. There is a separate MAC address for Ethernet and WiFi interfaces. The address is different for all Pi’s and can be used to identify your device. The “Media Access Control” address is a unique identifier given to all networked devices. It can sometimes be useful to obtain the MAC address of your Raspberry Pi’s network interfaces.