Are you curious about the MAC addresses of the other devices on your network? It is very easy to find them using the following command on any Linux device.
Would you like to find the MAC address of the mobile phone of your wife? Or are you curious about the MAC address of your laptop or maybe your fridge (which also has a network device installed)? How can you find it? It is very easy!
To find the IP addresses and MAC addresses of the other devices on the same network as yours, do the following.
Find the MAC addresses of other devices on the same network as you.
To get started, find your very own IP address. Type the following command in the Linux command line.
ip -a
Now you will see a list of the network devices on your computer. You will also see your local IP address on the internal network and the subnet mask. Normally your IP address will look something like 192.168.0.104 and the subnet mask will look like 255.255.255.0. There might be changes here, but this is a quite normal way for it to look.
But, what can you do now? When you have this information in hand, do the following.
sudo apt install nmap
This will install Nmap on your computer, a fantastic program for running diagnostics on your device and your network. Now it is time to have some fun.
sudo nmap -sn 192.168.0.1/24
Above you should use the IP address of your gateway (router), and then the 24 is the correct number behind the slash if the subnet mask is 255.255.255.0. This command will show you all the devices connected to the local network. With the settings, you will have a maximum of 254 devices possible, but if it is a normal home network, you will most likely see 3-10 devices or something like that.
It will take some seconds for the results to show up, but once they do, you will see a list of the connected devices, their local IP addresses, their MAc addresses, and also their network names (if they have any).
With this, you have found the MAC address of a different device on your network. It wasn’t hard, was it?
If you want to learn more about a specific device on a certain IP address (for example 192.168.0.101), run the following command.
sudo nmap 192.168.0.101
This will show you the open ports of that given host and also show you the MAC address of the device using that given IP address.
Find MAC address using ARP.
There is a different method you can use that is even easier to use. Run the following command and you should be able to see the local IP addresses and the MAC addresses of all devices connected to the same router/gateway.
arp -e
That was easy, wasn’t it? You now have two methods for finding the IP addresses and MAC addresses of other users using the same network as yourself.
That’s it for now. You are ready to look up the MAC address of other users on the same network as you. One little warning in the end. Nmap is a very powerful tool and if you use it, you might catch the attention of network administrators who catch dangerous signals on the network. In other words, tell your network administrators about your intentions before you start. If not, you might very well get some extra attention that you do not really want.