Finding Out Your IP Address
You want to know the IP address of your Raspberry Pi so that you can communicate with it, whether connecting to it as a web server, exchanging files, or controlling it remotely with SSH (Recipe 2.7) or VNC (Recipe 2.8).
An IP address is a four-part number uniquely identifying a computer’s network interface within a network. Each part is separated by a dot.
To find the IP address of your Raspberry Pi, you need to issue this command in a Terminal window:
$ sudo ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:d5:f4:8f inet addr:192.168.1.16 Bcast:192.168.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1114 errors:0 dropped:1 overruns:0 frame:0 TX packets:1173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:76957 (75.1 KiB) TX bytes:479753 (468.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan0 Link encap:Ethernet HWaddr 00:0f:53:a0:04:57 inet addr:192.168.1.13 Bcast:192.168.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6661 (6.5 KiB) TX bytes:6377 (6.2 KiB) |
Looking at the results of running this ifconfig, you can see that the Pi in question is connected by both a wired connection (eth0) with an IP address of 192.168.1.16, and a wireless one (wlan0) with an IP address of 192.168.1.13.
Discussion
As you can see, a Raspberry Pi can have more than one IP address (i.e., one for each network connection). So if you have both a wired connection and a wireless connection to your Pi, it would have two IP addresses. Normally, however, you would only connect it by one method or the other, not both.
Another way to find your IP address is to connect to the management console of your home hub and find the LAN page and then the IP table. There should be a device listed called raspberrypi with its IP address next to it.
See Also
Wikipedia has everything you want to know about IP addresses.