DEV Community

Cover image for Setting Raspberry Pi with Laptop
Amal Satheesan
Amal Satheesan

Posted on • Updated on

Setting Raspberry Pi with Laptop

Requirements

  1. Raspberry Pi (all models)
  2. Memory card (16GB or larger recommended)
  3. SD Card adapter
  4. LAN cable
  5. Power adapter

Disclaimer:

You can use any operating system of your choice. I'll be demonstrating with Arch Linux, but the steps are applicable across different OSes.

Installing the Operating System

Start by downloading your preferred Raspberry Pi operating system here. If you prefer another ARM-based OS, feel free to download it instead.

Flashing the OS

To flash the OS onto your SD card, download Raspberry Pi Imager from here or from their GitHub repository for other systems.

  1. Connect the SD card to your computer.
  2. Open Raspberry Pi Imager.
  3. Select your device.
  4. Choose the downloaded OS.
  5. Select the SD card as the storage location.
  6. Configure hostname, username, and password.
  7. Enable SSH.
  8. Write the image to the SD card.

Setting Up Remote Access

After flashing:

  • Create an empty file named ssh (without an extension) in the bootfs directory of the SD card.
  • Eject the SD card and insert it into your Raspberry Pi.
  • Power on the Raspberry Pi.
  • Connect your laptop to the Raspberry Pi using a LAN cable.

Using PuTTY and VNC Viewer

Download PuTTY for SSH access and VNC Viewer for a graphical interface.

  1. Open PuTTY and connect using <hostname>.local.
  2. Accept the connection and log in with the previously set credentials.

Enabling VNC

To enable VNC for graphical access:

sudo raspi-config
Enter fullscreen mode Exit fullscreen mode

Navigate to:

  1. Display options: Set a resolution.
  2. Interface options: Enable VNC.

Access VNC by typing <hostname>.local into your browser's address bar.

Image description

Logging in via Command Line/Terminal

To access the Raspberry Pi via terminal:

ssh <username>@<hostname>.local
Enter fullscreen mode Exit fullscreen mode

or

ssh <username>@<ip_address_of_pi>
Enter fullscreen mode Exit fullscreen mode

Stay tuned for more exciting projects and tutorials in my Raspberry Pi series! Happy tinkering!

Top comments (0)