Raspberry Pi online course

Set Up a Raspberry Pi: Hardware, Storage, Display, and First Connections

Learn how to set up a Raspberry Pi safely, including model identification, power, boot storage, display, keyboard, mouse, networking, and first boot.

A Raspberry Pi is a single-board computer: a complete computer built on one circuit board with a processor, memory, ports, and connectors. The board itself is usually only one part of a working setup. You commonly need to provide storage, power, a display, input devices, and possibly network equipment.

A typical first setup has four stages: prepare boot storage with an operating system, connect the display and input devices, attach networking if required, and apply power only after the other connections are complete. Connector locations and requirements vary between Raspberry Pi generations and models, so identify the exact board before buying accessories or following port-specific instructions.

What You Need for a Raspberry Pi Setup

The following checklist describes a basic local desktop setup. A headless setup can omit the directly connected display, keyboard, and mouse, but it still needs prepared boot storage, power, and a method for network access.

ComponentPurposeDesktop required?Compatibility checks and selection notes

Raspberry Pi board — The computer itself — Yes — Identify the exact model and generation.

Power supply and cable — Provides regulated power — Yes — Match the connector, voltage, current capacity, and cable quality to the model. USB devices increase demand.

SD or microSD card — Holds the boot files and operating system — Usually yes — Confirm whether the board uses a full-size SD card or microSD card, and choose a reputable compatible card.

Card reader — Lets another computer write the operating-system image — Needed to prepare the card — The reader must accept the card format.

Display — Shows the operating system and setup screens — Yes for a local desktop — HDMI-capable monitors and televisions are common; DVI displays need an adapter.

Video cable or adapter — Connects the board to the display — Yes for a local desktop — Match full-size HDMI or micro HDMI on the board and the input on the display.

Keyboard — Text input and navigation — Yes unless headless — Standard USB keyboards are usually easiest for first boot. Bluetooth requires operating-system and hardware support.

Mouse — Pointer input — Optional for some uses, normally included for a desktop — A standard USB mouse is generally suitable.

Network connection — Updates, downloads, remote access, and online services — Optional for every local first boot — Use Ethernet, built-in Wi-Fi, or a compatible USB Wi-Fi adapter.

Identify the Model and Connectors

Look for the model name printed on the board, packaging, or purchase record. Check it before purchasing a case, power supply, video cable, storage card, camera cable, or wireless adapter. Similar-looking boards can use different connector sizes and power arrangements.

Locate these features on the board:

  • Power connector: supplies electricity to the board. Common families include micro-USB on several older models and USB-C on many newer models.
  • Boot-storage slot: accepts a full-size SD card or, more commonly on many models, a microSD card.
  • USB ports: connect keyboards, mice, storage devices, wireless adapters, and other peripherals.
  • Display output: may be full-size HDMI or micro HDMI, depending on the model.
  • Ethernet port: provides wired networking on boards that include one.
  • Camera connector: a dedicated ribbon-cable connector for a compatible camera module.
  • GPIO header: general-purpose input/output pins for electronics projects. GPIO is not needed for basic computer setup.

Board or feature familyPowerBoot storageDisplayNetworkImportant note

Legacy micro-USB models — micro-USB — Check the exact SD arrangement — Check the exact HDMI arrangement — Wireless and Ethernet vary — Do not assume accessories for newer boards will fit.

Models with full-size HDMI — Model-dependent — Model-dependent — Full-size HDMI — Model-dependent — Use a standard HDMI cable only when the board has the matching port.

Models with micro HDMI — Often model-dependent — Often microSD — micro HDMI — Many newer boards include wireless networking — A micro-HDMI cable or suitable adapter is required.

Models with USB-C power — USB-C — Model-dependent, commonly microSD — Model-dependent — Model-dependent — The supply and cable must meet the exact model requirements.

Models with integrated Wi-Fi — Model-dependent — Model-dependent — Model-dependent — Wi-Fi is built in — Wireless setup still requires correct credentials and operating-system support.

Models requiring external Wi-Fi — Model-dependent — Model-dependent — Model-dependent — Use a compatible USB Wi-Fi adapter — The adapter occupies a USB port and adds to power demand.

Prepare Boot Storage and the Operating System

The Raspberry Pi normally starts its operating system from removable flash storage rather than a conventional internal hard drive. The operating system is the software that provides the desktop, command line, applications, and hardware support. Raspberry Pi OS is a common beginner-friendly choice.

  1. Identify whether the board requires an SD card or microSD card.
  2. Choose a suitably sized, reputable card that is supported by the exact board and current operating-system recommendations. Storage requirements and image recommendations can change over time.
  3. Insert the card into a card reader connected to another computer.
  4. Use a supported Raspberry Pi imaging tool to select the board-appropriate operating system and the target card.
  5. When available, use advanced settings to preconfigure a hostname, user credentials, locale, Wi-Fi, and remote access for a headless installation.
  6. Erase or format the card when required by the imaging workflow, then write the image. Writing an image replaces data on the selected card, so verify the target before starting.
  7. Safely eject the card from the computer and insert it into the unpowered Raspberry Pi. Do not force it; the slot and card contacts must align correctly.

An imaging tool writes an operating-system image to the card in the layout expected by the board. Simply copying an image file onto the card is not the same as imaging it.

Always shut down the operating system before removing boot storage. Removing a card while it is being written can corrupt the filesystem and may make the system fail to boot.

Choose and Connect the Power Supply

A power supply is a regulated adapter that provides the voltage and current required by the Raspberry Pi. Requirements depend on the model and on attached USB devices. A phone charger or computer USB port is not automatically suitable: it may provide insufficient current, use the wrong connector, or experience voltage loss through a poor cable.

  • Match the supply specification to the exact board model.
  • Use the correct power-port type: micro-USB on several older families or USB-C on many recent models.
  • Use a quality cable with suitable conductors and connectors. A damaged or high-resistance cable can cause instability even when the adapter appears powerful enough.
  • Allow extra power capacity for USB storage, wireless adapters, cameras, and other peripherals.
  • Connect power last, after storage, display, input devices, and optional network cables are attached.

Undervoltage occurs when supplied power is insufficient. It can cause warnings, unreliable USB devices, display problems, crashes, data corruption, or repeated restarts. Sudden power removal can damage the operating-system filesystem because pending writes may not have completed.

Connect the Display

HDMI is a digital connector that can carry video and audio. The board may provide full-size HDMI or micro HDMI, a smaller HDMI connector. Select a cable or adapter that matches the board's actual port and the display's input.

  • For an HDMI monitor or television, connect the correct HDMI cable to the board and display.
  • For a micro-HDMI board, use a micro-HDMI cable or a compatible micro-HDMI-to-HDMI adapter.
  • Turn the display on and select the input to which the cable is connected.
  • Connect the display before powering the board, especially if automatic display detection is important.
  • Do not assume every cable or adapter supports every resolution. Actual display modes depend on the board, operating system, cable, adapter, and display.

DVI is a digital display interface. An HDMI-to-DVI cable or adapter may connect a Raspberry Pi to a DVI-only monitor, but verify the physical connector types and adapter direction before buying. DVI normally carries video without audio, so use a separate audio method if sound is required.

Connect the Keyboard and Mouse

Standard wired USB keyboards and mice are generally suitable. Connect them to the board's USB ports before applying power. If there are not enough ports, or if several devices draw significant power, use a powered USB hub.

Bluetooth keyboards and mice can be useful on models and operating systems that support Bluetooth. Wired devices are usually easier for initial setup because Bluetooth pairing may require an already working operating system and input device.

Set Up Network Connectivity

Networking is useful for operating-system updates, downloads, package installation, remote access, and file transfer, but it is not required for every initial local setup.

  • Ethernet: connect a network cable from the board's Ethernet port to a router or network switch before powering on.
  • Wi-Fi: use built-in wireless networking when the model provides it, then select the network and enter its credentials during first-run setup.
  • USB Wi-Fi adapter: older or wireless-less boards may need a compatible adapter. Confirm operating-system support and account for the adapter's USB-port and power usage.

For a headless setup, prepare supported Wi-Fi and remote-access settings during imaging, or connect Ethernet. After boot, find the Raspberry Pi on the local network and connect remotely. A headless setup does not require a directly connected monitor, keyboard, or mouse.

Optional Accessories

AccessoryWhat it addsWhen usefulCompatibility and power considerations

Case — Physical protection and mounting — Everyday use or projects — Preserve access to ports, GPIO, storage, and camera connectors; check ventilation and cooling clearance.

Powered USB hub — Additional USB ports with separate power — Multiple keyboards, storage devices, adapters, or other peripherals — A powered hub reduces the load on the board's USB power budget.

USB Wi-Fi adapter — Wireless networking — Boards without integrated Wi-Fi — Check driver support, physical fit, USB-port use, and power demand.

Camera module — Image and video capture — Camera and vision projects — Use the dedicated camera connector, the correct ribbon cable, and a model-compatible module.

Cooling accessory — Helps manage heat — Sustained or demanding workloads — Choose cooling appropriate to the board and case; keep vents unobstructed.

Ethernet cable — Wired networking — Reliable network access or headless setup — The board must have an Ethernet port, or another network adapter is required.

Power down before connecting a camera ribbon cable. Use the dedicated camera connector rather than a USB port when using a compatible Raspberry Pi camera module. Cases and cooling accessories must be selected for the exact board shape and workload.

Recommended Connection Sequence

  1. Identify the exact board model and check all accessory compatibility.
  2. Write a supported operating-system image to the SD or microSD card.
  3. Safely eject the card and insert it into the unpowered board.
  4. Connect the display and select the matching display input.
  5. Attach the wired keyboard and mouse.
  6. Connect Ethernet if desired, or prepare to configure Wi-Fi.
  7. Connect the compatible power supply last.
  8. Complete the operating system's first-run configuration.

What to Expect at First Boot

After power is connected, the board should begin reading the boot storage and produce display output if the card, cable, display input, and operating system are correct. The first-run configuration commonly asks for language, keyboard layout, time zone, user credentials, and network settings.

Once networking is available, apply operating-system updates. For command-line administration, see Terminal in Raspbian and Update Raspbian. For a remote installation, see Enable SSH in Raspbian and Access Raspbian Remotely.

To shut down safely from a terminal, run:

sudo shutdown -h now

Wait for the operating system to finish shutting down before disconnecting power or removing the card. A desktop environment may also provide a shutdown option.

Practical Setup Examples

Basic desktop with a monitor

Use a Raspberry Pi board, compatible power supply, prepared SD or microSD card, HDMI-capable monitor or television, the correct video cable, USB keyboard, and USB mouse. Insert the card, connect the display and input devices, optionally connect Ethernet, and then connect power. Complete the first-run configuration on screen.

DVI-only monitor

Use the Raspberry Pi's HDMI or micro-HDMI output with an appropriate HDMI-to-DVI cable or adapter. Select the DVI input on the monitor. Expect video without audio from the DVI connection; arrange separate audio if needed.

Older board with external wireless

Attach a compatible USB Wi-Fi adapter and configure it after booting. If the adapter and other peripherals create high power demand, disconnect unnecessary devices or use a powered USB hub and a reliable supply.

Headless network setup

Prepare the boot card with supported network and remote-access settings, insert it while the board is unpowered, connect Ethernet or use preconfigured Wi-Fi, and then apply power. Find the device on the local network and connect remotely.

Camera expansion

Power down the Raspberry Pi, attach a compatible camera module using the correct ribbon cable and dedicated camera connector, and ensure that the case does not obstruct the connection. Camera connector and cable compatibility varies by board model.

Troubleshoot First-Setup Problems

SymptomLikely causesChecks and corrective actions

No display output — Wrong display input, incorrect full-size or micro-HDMI cable, adapter problem, unsupported display mode, or display connected too late — Select the correct input, confirm connector types, connect the display before power, and test a known-good cable, display, or adapter.

Failure to boot — Poor or underpowered supply, damaged cable, incorrectly imaged card, incompatible card, or excessive peripheral demand — Check the exact model's power requirement, disconnect nonessential USB devices, re-image the card, and try known-good storage and power.

Intermittent restarts — Undervoltage, high-resistance cable, or overloaded USB power — Use a suitable supply and cable, remove high-power accessories, and use a powered hub where appropriate.

Keyboard or mouse not detected — Loose connection, incompatible device, insufficient power, or too many attached devices — Test one device at a time, try another USB port, remove high-power accessories, or use a powered hub.

No network connection — Loose Ethernet cable, router issue, incorrect Wi-Fi credentials, no integrated Wi-Fi, or unsupported adapter — Test Ethernet, recheck wireless credentials, confirm the board's wireless capability, and verify adapter support and power.

Insufficient USB ports — More peripherals than available ports — Use a compatible USB hub; choose an externally powered hub when device power demand is high.

Storage not recognized or unreliable booting — Incomplete image write, unsuitable or worn card, improper insertion, or removal without shutdown — Rewrite the image, use a reputable compatible card, check that it is fully seated, and always shut down before removal.

Exam-Relevant Notes

  • Power must match the exact model's voltage and current requirements; an arbitrary phone charger is not automatically safe or sufficient.
  • Attach power last, after storage, display, input devices, and optional network equipment.
  • Full-size HDMI and micro HDMI are different physical connectors. USB-C and micro-USB power connectors are also different.
  • SD and microSD are different card formats; verify the board's storage slot.
  • DVI adapters generally provide video but not audio.
  • Built-in Wi-Fi varies by model. Boards without it may need a compatible USB Wi-Fi adapter.
  • Shut down the operating system before removing boot storage or disconnecting power.
  • GPIO and the camera connector are not interchangeable with ordinary USB ports.

For the next steps, review Install Raspbian, Format an SD Card, Connect to the Internet, and Raspberry Pi Board.