Getting Started with Raspberry Pi

VAIBHAV HARIRAMANI
11 min readNov 11, 2023

--

This article is an introduction to the Raspberry Pi. Learn what is a Raspberry Pi and what can you use it for. Explore its features, set it up, and install the operating system.

Introducing the Raspberry Pi

The Raspberry Pi is a small computer board about the size of a credit card. It was developed in the United Kingdom by the Raspberry Pi Foundation to promote basic computer science teaching in schools. Since its first general sale in 2012, more than 46 million Raspberry Pi boards have been sold by February 2022.

The Raspberry Pi has become tremendously popular among kids and electronics hobbyists, experienced makers, tinkerers, and even computer scientists.

The Raspberry Pi is hackable and small. So, it’s the perfect solution for tinkerers!

Raspberry Pi (Desktop Computer vs Headless)

In some way, you can look at the Raspberry Pi like a normal computer, it has a processor, RAM, USB ports to plug a keyboard and a mouse, an HDMI port to plug a TV or monitor, and you can even connect it to the internet.

You can do most things you do with a regular computer like web browsing, document editing, playing games, coding, and much more. The figure below shows the Raspberry Pi 3 set up as a desktop computer.

Raspberry Pi Headless

However, you don’t even need those accessories (mouse, keyboard, and monitor) if you don’t want to set it as a Desktop computer. It can run headless and you can control it remotely using Linux commands via a Terminal after establishing an SSH connection, for example.

Applications for Your Raspberry Pi

There are no limits to what you can do with your Raspberry Pi. Here are just some examples:

  • Write your own programs;
  • Create your own electronics projects;
  • Build your own web server;
  • Build a home automation system;
  • Use it as a local server for Home Automation applications;
  • Set it up as a gateway for your IoT projects;
  • Use it as a private cloud storage;
  • Host an MQTT broker;
  • Build a retro gaming console;
  • Build a VPN Router;
  • Use your Pi as a desktop computer;
  • Make your own CCTV system;
  • Robotics;
  • And much more.

Different Raspberry Pi Boards

There are different releases of the Raspberry Pi board. Here’s a list of the most relevant:

  • February 2012: Raspberry Pi 1 Model B (Rev. 1)
  • April 2012: Raspberry Pi 1 Model B (Rev. 2)
  • February 2013: Raspberry Pi 1 Model A
  • July 2014: Raspberry Pi 1 Model B+
  • November 2014: Raspberry Pi 1 Model A+
  • February 2015: Raspberry Pi 2 Model B
  • November 2015: Raspberry Pi Zero
  • February 2016: Raspberry Pi 3 Model B
  • February 2017: Raspberry Pi Zero W
  • 2016: Raspberry Pi 3 Model B
  • March 2018: Raspberry Pi 3 Model B+
  • June 2019: Raspberry Pi 4 Model B

f you don’t have a Raspberry Pi board yet, we recommend you get a Raspberry Pi 4 (preferable) or a Raspberry Pi 3 B+.

The Raspberry Pi 4 offers a choice of memory capacities. You can get a Pi with 1GB, 2G, 4GB, or 8GB of RAM.

Raspberry Pi 4 Features

Exploring the Raspberry Pi 4 Model B Board

The figure below shows the Raspberry Pi 4 Model B annotated.

Here’s a glance at what each component of the Raspberry Pi does:

  • USB ports: to connect a mouse, a keyboard, or other peripherals. It comes with two USB 3.0 and two USB 2.0 ports;
  • Ethernet port: to connect to the internet using an Ethernet cable;
  • Audio jack: to connect an audio device;
  • CSI connector: to connect a camera with a CSI ribbon;
  • HDMI connector: to connect a monitor or TV;
  • Processor: is the brain of the Raspberry Pi;
  • MicroSD card slot: to insert a microSD card to store your files and your operating system;
  • MicroUSB power input: to power up your Pi;
  • DSI connector: to connect DSI-compatible displays;
  • Antenna: picks up wireless LAN and Bluetooth signals;
  • GPIOs (general purpose input output pins): connect devices to interact with the outside world like sensors and outputs like LEDs and motors.

Accessories You Need To Get Started

When you buy a Raspberry Pi board, you only get a bare electronic board that doesn’t do much on its own. You need several accessories to get started.

There are a lot of accessories for the Raspberry Pi, but you need at least a microSD card and a power supply. Without these accessories your Raspberry Pi is useless.

  • Power supply: you need a power adapter that provides 2.5A 5V
  • MicroSD card: we recommend getting a microSD card with at least 16GB, class 10. You need a microSD card to store your files and the Pi’s operating system. The Pi doesn’t have a hard drive*, so everything you do on your Pi is saved on the microSD card, even the operating system. You can get a microSD card with the operating system preloaded or install the operating system yourself (which we recommend).

* you can get an expansion board that lets you add a SATA hard disk drive (HDD) or solid-state drive (SSD).

There are also useful accessories you may consider getting like an HDMI cable to connect a monitor, and a Raspberry Pi case to protect your board. A spare mouse and keyboard can also be useful to set your Raspberry Pi as a desktop computer.

Installing the Operating System

There are several operating systems suitable for the Pi. The official distribution for the Raspberry Pi is Raspberry Pi OS and that’s the one we recommend you install (specially if you’re a beginner, because it is the most supported).

1) Start by connecting the microSD card to your computer.

2) Go to the Raspberry Pi Software page.

3) Select and download the Raspberry Pi Imager (a tool to flash the OS on the microSD card) for your computer’s operating system.

4) Click on the downloaded file to install the Raspberry Pi Imager.

5) When the installation is complete, the Raspberry Pi Imager will open.

6) Click on Choose OS to select the Operating System. Select the Raspberry Pi OS, or the Raspberry Pi OS 64-bit under the Raspberry Pi OS (other) option.

7) Choose storage. You must choose the microSD card where you want to install the OS.

8) The Raspberry Pi Imager allows you to access advanced settings to configure hostname, SSH, Wi-Fi, among others — click on the gear icon to open advanced settings. If your window doesn’t show the gear icon, press CtrlShiftX to open the advanced setting window.

9) You can set hostname (the default will be raspberrypi), enable SSH, and set a password for SSH connection. If you want to use the Raspberry Pi as a desktop computer, you don’t need to enable SSH.

10) Additionally, set up Wi-Fi with your local network credentials, so that you can connect to your Raspberry Pi using Wi-Fi later on.

11) Set up your country and time zone. Finally, click Save.

12) After selecting the operating system, storage, and advanced settings, click on write to start installing the operating system on the microSD card.

13) Wait a few seconds while it installs the Operating System.

14) When the installation is complete click on Continue. It will eject the microSD card safely.

15) Now, remove the card from your computer and insert it into your Raspberry Pi. Then, apply power to the Raspberry Pi to start it.

Then, if you’re running the Raspberry Pi headless, you can establish an SSH connection with your Pi to install software, run programs, create folders, and files, etc.

Connecting via SSH to the Raspberry Pi

SSH (which stands for secure shell) is a method of establishing a communication with another computer securely. All data sent via SSH is encrypted. SSH is based on a Unix shell, so it allows you to access your Raspberry Pi files from a remote machine by using terminal commands.

This part is divided into two sections:

  • A) Windows
  • B) Mac OS X/Linux.

A) Windows

To communicate with the Raspberry Pi via SSH, you need a software to handle SSH communication. We’ll use PuTTY. You need to install it on your computer if you haven’t already.

Downloading PuTTY

If you use Windows, you need to download and install a free application called PuTTY. Here’s how to install it:

1) Open your web browser and go to www.putty.org

2) Download PuTTY. We recommend downloading the putty.exe file.

3) Run the putty.exe file to execute the software.

Connecting to the Raspberry Pi via SSH

With PuTTY installed, power up your Raspberry Pi and follow these steps:

1) Open PuTTY.

2) Select/enter the following options:

  • Host Name: raspberrypi *
  • Port: 22
  • Connection type: SSH

* raspberrypi is the default hostname. If you’ve inserted a different hostname in the installation process, you should use that instead.

3) Click Open.

4) When you connect to your Raspberry Pi for the first time, you’re prompted by a message warning you that you’re attempting to establish a connection with an unknown host. Simply click No to proceed.

5) Now, you need to login to your Raspberry Pi using the username and password you set on the installation process.

On the new window that opens, type your username and hit Enter.

6) Then, enter your password and hit Enter. You won’t see any characters showing up on the window while you type the password.

Now you have an SSH communication established with your Raspberry Pi. This will be useful to install software on your Pi, run your programs, create folders or files, etc…

I recommend reading Raspberry Pi Cheat Sheet with Basic Linux Commands.

Shutting Down

To shut down your Raspberry Pi, simply type this command on the command line:

pi@raspberry:~ $ sudo poweroff

The SSH connection will be shut down right after.

B) Mac OS X/Linux

SSH (which stands for secure shell) is a method of establishing a communication with another computer securely. All data sent via SSH is encrypted.

SSH is based on a Unix shell, so it allows you to access your Raspberry Pi files from a remote machine by using terminal commands. It has grown to be one of the most popular methods for communication between different devices.

Establishing an SSH Communication

In Mac OS X and Linux, you can use the default Terminal window to establish an SSH communication, because SSH comes in all Unix-based OSes. Follow these steps:

1) Boot up your Raspberry Pi.

2) Open a new Terminal window.

3) Type the following command:

$ sudo ssh pi@raspberrypi

or:

$ sudo ssh pi@raspberrypi.local

Note: if you defined a different hostname and username rather than raspberrypi and pi, you should use those instead.

4) Enter your computer password (so you can run a sudo command), and type yes.

5) When you’re asked to type a password for your Raspberry Pi type the password you’ve set previously, press Enter/Return.

When you connect your computer to your Raspberry Pi for the first time, you’re prompted by a message warning you that you’re attempting to establish a connection with an unknown host. Simply click OK to proceed

Your Terminal window should look like the Figure below:

Now you have an SSH communication established with your Raspberry Pi. This will be useful to install software on your Pi, run your programs, create folders or files, etc

Now you’re connected at the command prompt, but if you want to access the GUI, complete with a desktop and floating windows, you’ll need to enable VNC.

Enabling and Connecting over VNC

1. Enter sudo raspi-config at the command prompt. You can do this when you’re connected via SSH.

A configuration app opens.

2. Select Interface Options.

3. Select VNC.

4. Select Yes and Hit Enter.

5. Hit Enter to acknowledge the VNC server is enabled.

6. Select Finish and Hit Enter.

On your PC, you will need a VNC viewer. If you are using Raspberry Pi OS Bookworm (the latest version and the default for Pi 4 and Pi 5), we recommend that you use TigerVNC with the following steps. If you are on an earlier Raspberry Pi OS such as Bullseye or Buster, we recommend VNC Viewer, which sadly doesn’t work with Bookworm.

1. Download, install and launch TigerVNC or VNC Viewer

2. Enter the host name of your VNC server for TigerVNC(ex: raspberrypi.local) or for VNC Viewer enter IPaddress and click Connect.

3. Click Yes if prompted with a certificate warning.

4. Enter your username and password. Then click Ok.

Your Raspberry Pi desktop will then appear in a window on your main computer’s desktop. You’ll be able to control everything from there.

Shutting Down

To shut down your Raspberry Pi, simply type this command on the command line:

pi@raspberry:~ $ sudo poweroff

Wrapping up

In this tutorial, you’ve set up your Raspberry Pi to run headless. You’ve installed the Raspberry Pi OS, set up Wi-Fi, and enabled SSH so that you can access the Raspberry Pi command line from another machine on the same network. Finally, you established an SSH connection with the Raspberry Pi.

I hope this guide was useful. You’re now able to easily connect via SSH to your Raspberry Pi

--

--

VAIBHAV HARIRAMANI

Hi there! I am Vaibhav Hariramani a Travel & Tech blogger who love to seek out new technologies and experience cool stuff.