I have a raspberry PI 3B. When I connect it via LAN, the ifconfig on UBuntu does not show any IPv4 address (Just IPv6). What should I do to find the correct IP range of my RPi? (and then use nmap to find exact IP and finally connect via SSH)

(Sadly I don't have any display to tweak with raspbian GUI!)

2 Answers 2


This might not be "the best" solution, but it works:

If you haven't configured a static IP address and in the absence of a DHCP server, your Raspberry Pi will have a self assigned link-local IP-address in the range of to

If the Ethernet interface on your Ubuntu machine did not self assign a link-local IP-address, you can set it yourself in the same subnet as the Raspberry Pi, e.g. by (change eth0 to the name of your interface)

sudo ifconfig eth0

Now you can ping for your Raspberry Pi, which will also report the IP-address of your Raspberry Pi

ping raspberrypi.local

Alternatively you can directly ssh into your Raspberry Pi

ssh [email protected]

If the raspberrypi.local addressing does not work, you can search for the IP-address with arp-scan (you might have to install it first):

sudo arp-scan --interface=eth0
  • 1
    Attempting to assign a Link-local address is futile!
    – Milliways
    Nov 10, 2018 at 22:01
  • I am not saying this is the best way to go. But technically it works without problems both in Raspbian and Ubuntu using ifconfig.
    – oh.dae.su
    Nov 10, 2018 at 23:00
  • 1
    It is futile, because the link ALREADY has a Link-local address (this is an essential part of the address resolution protocols) and works DESPITE attempts to assign a new one.
    – Milliways
    Nov 10, 2018 at 23:28

ifconfig is deprecated. On your pi issue the following command to determine the details of your addressing:

ip addr list

This will show both IPv4 and IPv6 addressing details:

ip addr list output

HTH- Terrence

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.