HomeRaspberry PiConnect Raspberry Pi to laptop PC in 4 simple steps (internet too)

Connect Raspberry Pi to laptop PC in 4 simple steps (internet too)

Getting started with Raspberry Pi doesn't have to be hard.

Here is a simple guide on how to connect a headless (no display, no keyboard) Raspberry Pi to a laptop PC. I’m doing it on Windows 10, but I can’t think of a reason why it wouldn’t work on other systems. I spend way too much time trying to find a quick and simple guide online after messing up my card. Now, you have one! You will also share the internet connection if your computer has one available.

Step 1. Get all things ready to connect Raspberry Pi to laptop PC

You will need:

  • A working PC duh! (internet connection is not required if you have all other things ready)
  • A Raspberry Pi (Zero, Raspberry Pi 2, Raspberry Pi 3, If you have other versions do yourself a favor and buy a new one here!)
  • an Ethernet cable
  • SD card with Raspbian loaded on it
  • Putty client for Windows (Linux use the terminal, Mac users… well get a proper PC! :))

Step 2 Get the PC ready

If you wish to share your internet connection with the Raspberry Pi, you will have to be little more strict with the IP selection.

My local IP is 192.168.1.7  therefore, my address will start with 192.168.xxx.xxx . Go to your internet connection adapter (WI-FI if your PC is wireless, or Ethernet if you have a second port), select properties and click on the sharing tab. Share this connection with the one that your Raspberry Pi will be using. You will see a prompt telling you what IP address will be assigned to the ethernet port. It will be something starting with 192.168.x.x (192.168.137.1 in my example)

If the IP has not been automatically assigned, go to the Network and Sharing centre, then click change the adapter settings. You need to load the adapter properties and select Network Protocol Version 4 (TCP/IP). Select the manual configuration and type in the IP as follows:

IP address: 192.168.137.1
Subnet mask: 255.255.0.0

Step 3. Get the SD card ready

IMPORTANT
Please make note that on the Pixel edition of the Raspbian you have to create an empty ‘ssh’ (empty file names ssh without any extension) file in the /boot/ directory. This file has to be created each time you boot the Raspberry Pi until you enable the SSH via raspi-config. By default, the SSH server is disabled on new Raspbian images.
Add ip address to the cmdline.txt
Add IP address to the cmdline.txt

We need to force an IP when raspberry is loading for the first time. To do this – we will open a file on a boot partition of the card. Plug the card into the PC,  open the partition and look for the cmdline.txt file. Add the following line to the cmdline.txt.

ip=192.168.137.2

Make sure not to make a new line by doing so. Keep the whole file as a single line. Save the file – and remove (a preferably safely) card from the PC. Plug it in the Raspberry Pi. Save your changes. You are ready to go.

Step 4 Connect

Connect the ethernet cable to the Raspberry Pi and PC, then turn on the Raspberry. Wait until the network will stop identifying it. Once the connection is established – open up Putty.

Enter the IP address used in the cmdline.txt and connect to the port 22 (I assume this is the first time you connect to the Raspberry and everything is set to default)

Enter the Raspberry Pi credentials:

login (default): pi
password (default): raspberry

and… You know how to connect Raspberry Pi to laptop PC. Now that you wonder how to make the changes permanent and assign a static IP take a look on this guide.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

How to boot Raspberry Pi 5 from NVMe M.2 SSD

0
This is how you can boot your Raspberry PI 5 from NVMe in 10 min! Check out these easy instructions

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation