Find devices on a network in Linux

· Thomas Taylor

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:

1sudo apt install nmap

For MacOS:

1brew install nmap

Using nmap

Firstly, grab your IP address using ifconfig


the output will contain an IP.

1inet netmask 0xffffff00 broadcast

nmap is simple to use - simply run the command like the example below:

1sudo nmap -sn

The /24 is CIDR notation. It’s instructing nmap to scan all ip addresses between and

The -sn option is a portless scan of the IP address range.


1Nmap scan report for
2Host is up (0.012s latency).
3MAC Address: 00:11:32:C2:7B:96 (Synology Incorporated)

In my case, I was looking for the IP address of my Synology NAS.


Reply to this post by email ↪