Finding a device that’s connected to a network on Linux is easy with an open source tool named nmap
.
What is nmap
?
nmap
is a utility for network discovery and security auditing. It’s designed to rapidly scan large networks.
Install nmap
nmap
is available through most popular package managers.
For Debian-based distributions:
|
|
For MacOS:
|
|
Using nmap
Firstly, grab your IP address using ifconfig
|
|
the output will contain an IP.
|
|
nmap
is simple to use - simply run the command like the example below:
|
|
The /24
is CIDR notation. It’s instructing nmap
to scan all ip addresses between 192.168.1.0 and 192.168.1.255.
The -sn
option is a portless scan of the IP address range.
Output:
|
|
In my case, I was looking for the IP address of my Synology NAS.