How to connect to a Raspberry Pi via Ethernet to a modem

IMPORTANT: Normally you'd turn off your Raspberry Pi by using the shutdown command from a command line or use an option in a graphical user intereface. But we're still just trying to connect to the Pi at this point. If you have problems, don't remove power if it's been on for only a few seconds since there may be data waiting to be written to the SD card. Wait a minute or so before turning it off or watch the SD card indicator light to see when it's been quiet before removing power.
Connect to the router via Ethernet.
Connect the Raspberry Pi to the router via Ethernet.

This involves connecting your Raspberry Pi to your router using an Ethernet cable. The computer can be connected to the router using an Ethernet cable as well, or using wireless.

To physically connect the Pi to the router you'll need an Ethernet cable that has male RJ45 connectors on both ends. Plug one end into the computer and the other end into the Pi.

Ethernet cable with male RJ45 connectors.
Ethernet cable with male RJ45 connectors.
Male RJ45 connector close up.
Male RJ45 connector close up.

Next, give power to your Raspberry Pi. You should see various lights lit up at different times.

Finding the Pi's IP address

The router should have noticed that the Pi is connected to it and it should have given it an IP address. You need to find out what that IP address is. For most routers you should be able to go to a browser and type in the IP address of your router to connect to it as is shown in the snapshot below. Type the address into the browser's address bar, located near the top-left of the browser window, and press Enter. If you don't know the router's IP address then contact your internet provider to get it. It'll be something like or In the snapshot I'm using the Firefox browser running on Windows Vista and have already given it the IP address following the above steps. You can see it circled in the top, left. Note that I typed in only the "" in the address bar. The browser filled in the stuff that you see following it. My router is called the Bell Home Hub 1000 and that's what you see in the webpage that came up. Unless you have the same router, yours will look different but have similar features.

The modem's IP address in Firefox.
The modem's IP address entered in Firefox's address bar.

For my router, the next thing I need to do is click on the Network icon on the right, as highlighted in red in the above snapshot. That changes the webpage to show more information about my network, as shown in the snapshot below.

Circled in red at the bottom, you can see that it's showing the Raspberry Pi as being connected and it's giving its IP address,, the one we're looking for.

Router network information.
Router network information.

Using the IP address to connect to the Pi

Now that you have the Pi's IP address, you can connect to it however you want, provided the setup on your Pi allows you to connect.

In my case, the setup that came with Raspbian on my SD card allowed me to ping the Pi to see if I could get to it at all. This is done by running the ping command and passing it the Pi's IP address, as shown below. Doing a ping is like tapping it on the shoulder to see if it's there.

Pinging the Pi from a Windows Command Prompt window.
Pinging the Raspberry Pi from a Windows Command Prompt window.

I could also start up an SSH (secure shell) session using PuTTY, free software that most Pi users use at one point or another. In the snapshot below I'm running it from a Windows Command Prompt window. Once it was up, I typed in the Pi's IP address.

Running PuTTY from a Windows Command Prompt window. Note I typed in the Pi's IP address.
Running PuTTY from a Windows Command Prompt window.

Note above that the Connection type is selected as SSH and so when I click on the Open button I get a new window with an SSH running in it. I'm asked to log in. For a new Raspberry Pi system the username is usually pi and the password is raspberry.

Logging into an SSH session.
Logging into an SSH session on a Raspberry Pi.

At this point you are connected and able to start typing commands.
Liked this? Share it with: