You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: remote-access/ip-address.md
+25-3
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,40 @@ It is possible to find the IP address of your Pi without connecting to a screen
18
18
19
19
In a web browser navigate to your router's IP address e.g. `http://192.168.1.1`, which is usually printed on a label on your router; this will take you to a control panel. Then log in using your credentials, which is usually also printed on the router or sent to you in the accompanying paperwork. Browse to the list of connected devices or similar (all routers are different), and you should see some devices you recognise. Some devices are detected as PCs, tablets, phones, printers, etc. so you should recognise some and rule them out to figure out which is your Raspberry Pi. Also note the connection type; if your Pi is connected with a wire there should be fewer devices to choose from.
20
20
21
+
### Resolving `raspberrypi.local` with mDNS
22
+
23
+
On Raspbian, [multicast DNS](https://en.wikipedia.org/wiki/Multicast_DNS) is supported out-of-the-box by the [Avahi](https://en.wikipedia.org/wiki/Avahi_(software)) service.
24
+
25
+
If your device supports mDNS, you can reach your Raspberry Pi by using its hostname and the `.local` suffix.
26
+
The default hostname on a fresh Raspbian install is `raspberrypi`, so by default any Raspberry Pi running Raspbian responds to:
27
+
28
+
```bash
29
+
ping raspberrypi.local
30
+
```
31
+
32
+
If the Raspberry Pi is reachable, `ping` will show its IP address:
33
+
34
+
```
35
+
PING raspberrypi.local (192.168.1.131): 56 data bytes
36
+
64 bytes from 192.168.1.131: icmp_seq=0 ttl=255 time=2.618 ms
37
+
```
38
+
39
+
If you change the system hostname of the Raspberry Pi (e.g., by editing `/etc/hostname`), Avahi will also change the `.local` mDNS address.
40
+
41
+
If you don't remember the hostname of the Raspberry Pi, but have a system with Avahi installed, you can browse all the hosts and services on the LAN with the [`avahi-browse`](https://linux.die.net/man/1/avahi-browse) command.
42
+
21
43
### nmap command
22
44
23
-
The `nmap` command (Network Mapper) is a free and open-source tool for network discovery, available for Linux, Mac OS, and Windows.
45
+
The `nmap` command (Network Mapper) is a free and open-source tool for network discovery, available for Linux, macOS, and Windows.
24
46
25
47
- To install on **Linux**, install the `nmap` package e.g. `apt-get install nmap`.
26
48
27
-
- To install on **Mac OS** or **Windows**, see the [nmap.org download page](http://nmap.org/download.html).
49
+
- To install on **macOS** or **Windows**, see the [nmap.org download page](http://nmap.org/download.html).
28
50
29
51
To use `nmap` to scan the devices on your network, you need to know the subnet you are connected to. First find your own IP address, in other words the one of the computer you're using to find your Pi's IP address:
30
52
31
53
- On **Linux**, type `hostname -I` into a terminal window
32
-
- On **Mac OS**, go to `System Preferences` then `Network` and select your active network connection to view the IP address
54
+
- On **macOS**, go to `System Preferences` then `Network` and select your active network connection to view the IP address
33
55
- On **Windows**, go to the Control Panel, then under `Network and Sharing Center`, click `View network connections`, select your active network connection and click `View status of this connection` to view the IP address
34
56
35
57
Now you have the IP address of your computer, you will scan the whole subnet for other devices. For example, if your IP address is `192.168.1.5`, other devices will be at addresses like `192.168.1.2`, `192.168.1.3`, `192.168.1.4`, etc. The notation of this subnet range is `192.168.1.0/24` (this covers `192.168.1.0` to `192.168.1.255`).
0 commit comments