As an Amazon Associate we earn from qualifying purchases.
If your Raspberry Pi has no monitor, keyboard or mouse attached, you can’t just type hostname -I to see its address. The good news is that you don’t need a screen at all. Your Pi gets an IP address from your network when it boots, and you can discover it from a Windows PC with a free tool called Nmap. Once you have the address, you can log in over SSH using PuTTY.
This guide walks through the whole process: finding your computer’s own IP address, scanning the network for the Pi, and connecting. The video above shows the same steps. I originally wrote this on Windows 8, so menus may look a little different on Windows 10 or 11, but the commands are the same.
What you need
- A Raspberry Pi that is powered on and connected to the same network as your PC, by Ethernet cable or Wi-Fi.
- A Windows PC on that same network.
- Nmap installed on the PC (free, from nmap.org).
- PuTTY installed on the PC (free SSH client).
- SSH enabled on the Pi. On Raspberry Pi OS you can enable it when writing the SD card with Raspberry Pi Imager, or by placing an empty file named ssh (no extension) on the boot partition of the card.
Give the Pi a minute or two to finish booting before you scan. If you scan too early, it won’t show up yet.
Step 1: Find your computer’s IP address
Nmap needs to know which network to scan, so first check your own PC’s address. Open Control Panel → Network and Internet → Network and Sharing Center.
On other systems, this guide to finding your local IP address shows the same step for Windows, Mac and Linux, and the router IP lookup guide helps you find the gateway address of your network.
Click on your connection (Ethernet or Wi-Fi) and then Details. You will see your computer’s IPv4 address. In my case it is 192.168.137.1, so the network I need to scan is the one that starts with 192.168.137 and covers addresses 192.168.137.0 to 192.168.137.255.
A quicker way is to open Command Prompt and type ipconfig. Look for the line called IPv4 Address under your active adapter.
Step 2: Scan the network with Nmap
Open Nmap (or Command Prompt, if Nmap was added to your path during installation) and run the following command, replacing the numbers with the first three parts of your own address:
nmap -sn 192.168.137.0/24
Here is what it means:
- -sn tells Nmap to only check which devices are online, without scanning their ports. This makes it fast.
- 192.168.137.0/24 is the range to check. The /24 means all 256 addresses from 192.168.137.0 to 192.168.137.255.
When the scan finishes, you get a list of devices that responded. One of them is your Pi. In my case it was 192.168.137.157.
How to tell which device is the Pi
On a busy network you may see several devices. A few tips to pick the right one:
- Run the scan once with the Pi unplugged and once with it powered on. The address that appears only the second time is your Pi.
- Run Command Prompt as administrator. Nmap can then show the MAC address and the vendor name, and Raspberry Pi boards usually show a Raspberry Pi vendor name.
- Scan only for devices with SSH open: nmap -p 22 –open 192.168.137.0/24. Your Pi should be in that shortlist if SSH is enabled.
Your own PC and your router will also appear in the list. You can ignore those.
Step 3: Log in with PuTTY
Now that you know the address, you can connect:
- Open PuTTY.
- In the Host Name (or IP address) box, type the Pi’s address, for example 192.168.137.157.
- Leave the port at 22 and the connection type as SSH.
- Click Open. If PuTTY shows a security alert the first time, accept it. This only means the Pi’s key is new to your PC.
- Enter the username and password when asked.
On older Raspberry Pi OS images the default login was username pi and password raspberry. Newer images ask you to create a username and password when you prepare the SD card, so use the ones you chose. If you still use a default password, change it with the passwd command after logging in.
What to do after you are connected
Once you are in, you have a full command line on the Pi. From here you can update the system, install software or run scripts. If you prefer a desktop, you can set up a VNC server and view the Pi’s screen from Windows, or use Remote Desktop from Windows. To transfer files over FTP, you will need the same IP address you just found.
If you want to reach the board from outside your home network, read about controlling a Raspberry Pi behind a router.
Troubleshooting
The Pi doesn’t appear in the scan
Check that the Pi and the PC are on the same network and the same IP range. Wait a bit longer for the Pi to boot, check the power supply, and make sure the Ethernet cable is firmly connected or that Wi-Fi details were set up before first boot. Some networks, such as guest Wi-Fi, block devices from seeing each other.
PuTTY says "connection refused"
This usually means SSH is not enabled on the Pi. Put the SD card in your PC and add an empty file called ssh to the boot partition, or re-write the card with SSH turned on in Raspberry Pi Imager.
The IP address keeps changing
Most routers hand out addresses dynamically, so the Pi may get a different one after a reboot. You can set a DHCP reservation in your router for the Pi’s MAC address, or configure a static IP on the Pi itself.
FAQ
Can I find the Raspberry Pi IP address without Nmap?
Yes. You can log into your router’s admin page and look at the list of connected devices. You can also try ping raspberrypi.local in Command Prompt, which works on many setups if the Pi still uses its default hostname.
Is Nmap safe to use on my home network?
A -sn scan only checks which devices respond, and scanning your own network is normal. Only scan networks you own or have permission to test.
Why does my computer’s address end in .1?
That is common when your PC is sharing its internet connection with the Pi, as in my setup, or when the PC acts as the gateway. The network itself starts at .0, which is why the scan uses 192.168.137.0/24.
Do I need a monitor the first time I set up a Pi?
No. If you enable SSH and set up Wi-Fi or plug in Ethernet before the first boot, you can do the entire setup from your PC using the steps above.