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.
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.
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.
- Identify whether the board requires an SD card or microSD card.
- 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.
- Insert the card into a card reader connected to another computer.
- Use a supported Raspberry Pi imaging tool to select the board-appropriate operating system and the target card.
- When available, use advanced settings to preconfigure a hostname, user credentials, locale, Wi-Fi, and remote access for a headless installation.
- 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.
- 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
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
- Identify the exact board model and check all accessory compatibility.
- Write a supported operating-system image to the SD or microSD card.
- Safely eject the card and insert it into the unpowered board.
- Connect the display and select the matching display input.
- Attach the wired keyboard and mouse.
- Connect Ethernet if desired, or prepare to configure Wi-Fi.
- Connect the compatible power supply last.
- 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
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.