How to find Devices connected to your Network using Debian Linux

Sometimes you need to find out which devices are connected to your network. There can be several reasons for this. Maybe your Internet is running slower than usual, you notice suspicious activity that suggests someone is stealing your Wi-Fi, or you’re troubleshooting a problem. Whatever the reason, it’s a good idea to check who else is connected to your network so that appropriate action can be taken.

Nmap is a great tool to help you find devices connected to your network. It’s an open-source network discovery tool that lets you find out what other systems are on your network, what IP addresses they have, what services they offer, what operating system version they’re using, and more. It runs on almost all major operating systems, including Linux, Windows, and Mac OS.

In this article, we describe how to install and use Nmap to find devices connected to your Internet.

We use Debian 11 to explain the procedure described in this article. You can also use the same procedure for older versions of Debian.

Step 1: Open the Debian Terminal

Launch the Terminal application in your system by going into the Activities tab in the top left corner of your Debian desktop. Then in the search bar, type terminal. When the Terminal icon appears, click on it to launch it.

Step 2: Install the network scanning tool Nmap

Now in the Terminal application, run the following command as sudo to install the network scanning tool Nmap.

$ sudo apt-get install nmap

When prompted for the password, enter the sudo password.

Install nmap

The system will provide you with a y/n option to confirm the installation. Press Y to confirm and then wait for a while until the installation is completed on your system.

Step 3: Get the IP range/subnet mask of your network

Nmap needs a network ID to scan for the connected device on a specific network. So to find the network ID, we will need our IP address and the subnet mask.

Run the below command in the Terminal to find the IP address and subnet mask of your system:

$ ip a

Get IP range or subnet mask

The above output indicates that our system uses the IP address /24. /24 indicates our subnet mask is It means our network ID is and the network range is to

(Note: Network ID is calculated by performing the AND operation of the IP address and the subnet mask. If you do not know how to perform AND operation, you can any online subnet calculator).

Step 4: Scan the network (LAN/WAN) for connected device(s) with Nmap

Now we have our network ID, run the Nmap scan with –sn option using the following syntax:

$ nmap –sn <Network_ID/prefix>

In our scenario, it would be:

$ nmap -sn

Using Nmap with –sn option does not scan the ports, it only returns a list of live hosts:

Scan network for the connected devices

The above results show that three active devices are connected to our network, including our system (

That’s it! We have learned how to use the Nmap tool to find the connected devices on a network. It can help you find out which unwanted users are connected to your network and using its bandwidth.