How To Scan For Devices on Your Network
Finding a device on your network is an important task. It is wise to keep an eye on what machines are on your network, and what they are doing.
Also knowing the hostname or IP address of a machine means we can remotely connect to it, for example via SSH. If, for example, you have a Raspberry Pi hooked up but can’t remember its name, scanning the network will give you that information.
In this how-to, we will learn the various means to scan your home network and find the machines which are on it. To illustrate the task we’re going to search for a Raspberry Pi running the latest version of Raspberry Pi OS.
Finding Network Devices Via Your Router
(Image credit: Tom’s Hardware)
Each router is a little different, but most will offer a means to show all of the devices on your network. To see this, you will need to login to your router and navigate the options searching for “Devices”. Here we can see the Device Name (hostname) and the IP Address of machines on our network.
Finding Network Devices Via An App
Our preference is to use an app that will search our network and retrieve the details for us. We have used Fing on our Android devices for many years and it reliably returns the details of networked devices. Fing also offers an app for Windows and Mac.
1. Download and install Fing for your OS.
2. Create an account and follow the sign up process.
3. Open Fing and click on Devices.
(Image credit: Tom’s Hardware)
4. Click on Refresh to run a search for networked devices.
(Image credit: Tom’s Hardware)
5. Click on the device that you wish to connect to. Our example uses a Raspberry Pi.
(Image credit: Tom’s Hardware)
The hostname and IP address are now visible. Our hostname was “raspberrypi,” and we have two IP addresses as our Pi is connected via Wi-Fi and Ethernet.
(Image credit: Tom’s Hardware)
6. Scroll down and click on Find Open Ports to start a scan.
7. An optional step. Scroll down the page, click on Find open ports to run a port scan of the device. SSH is traditionally set to port 22.
(Image credit: Tom’s Hardware)
Scan for Network Devices in Linux and MacOS
Linux users can use nmap, a network scanning tool to search for all the devices on their home network and then display their open ports. Here we are using an Ubuntu 22.04 install.
1. Open a terminal and update the list of software repositories.
sudo apt update
2. Install nmap using the apt package manager.
sudo apt install nmap
3. Using sudo, invoke the nmap command with the -Pn argument to scan all IP addresses on your network. Our network uses the IP range 192.168.0.0 to 192.168.0.255, your network may not. Adjust the IP address range to match your network.
sudo nmap -Pn 192.168.0.0/24
4. Scroll through the returned results to find the device that you wish to SSH into. Our target was a Raspberry Pi, and we can see two IP addresses that match. Both of these are the same machine, connected via Wi-Fi and Ethernet.
(Image credit: Tom’s Hardware)