Unit

What Is a Raspberry Pi?

Learn what a Raspberry Pi is, how its hardware and software work, what you can build with it, what you need to get started, and how it compares with PCs and microcontrollers.

A Raspberry Pi is a family of small, low-cost single-board computers. A single-board computer, or SBC, is a functional computer built on one circuit board. A Raspberry Pi can run an operating system, applications, programming languages, and network services.

The name can refer to two related things. A Raspberry Pi board is the physical computer that you can hold and connect to other equipment. The Raspberry Pi organization develops and supports the platform, with a continuing educational mission focused on making programming and computer science accessible to learners.

Most Raspberry Pi boards are complete computers, but they are not usually ready-to-use appliances. You normally need a power supply, boot storage such as a microSD card, an operating system, and peripherals such as a display and keyboard.

Why Does Raspberry Pi Exist?

The original goal was to make computing and programming more accessible to students and beginners. A small, relatively affordable computer that could be experimented with helped learners move beyond consuming software to creating it.

Today, Raspberry Pi computers are used in education, home computing, prototyping, automation, robotics, monitoring, networking, and hobby electronics. They are useful because one board combines general-purpose computing with access to physical input and output pins.

Main Hardware Components

Exact specifications vary by model and generation. A newer performance-oriented board may have more processor power, memory, and connectivity than a smaller or older model. Common components include the following:

ComponentPurpose
ProcessorExecutes instructions and runs the operating system and applications.
MemoryTemporarily holds programs and data while they are running. Memory is different from permanent storage.
microSD slotProvides removable flash storage for the operating system, applications, and files on many models.
USB portsConnect peripherals such as keyboards, mice, storage devices, cameras, and USB network adapters.
Video outputUsually an HDMI connection for sending video and audio to a monitor or television. Connector types can differ between models.
NetworkingMay include Ethernet, Wi-Fi, and Bluetooth. The available connections depend on the model.
Power inputAccepts power from a suitable adapter and cable. The required connector and power specifications vary.
GPIO headerGeneral-purpose input/output pins used to read signals and control external electronics.
Camera and display connectorsSpecialized connectors available on some models for compatible camera or display hardware.

GPIO means general-purpose input/output. Software can use GPIO pins to read a button or sensor and to control components such as an LED, relay, or motor controller. GPIO is powerful, but it requires electrical care: a pin is not a general-purpose power supply, and unsuitable voltage or current can damage the board.

A microSD card is removable flash storage. It commonly contains the boot files, Raspberry Pi OS, applications, and user files. Storage quality matters because a damaged, slow, or incompatible card can cause boot failures and data loss.

Raspberry Pi Compared With Other Devices

CharacteristicRaspberry Pi single-board computerDesktop or laptopMicrocontroller board
Operating systemUsually runs a full Linux-based operating system.Runs a full desktop operating system with extensive application support.Usually runs a small program or firmware rather than a full desktop operating system.
Typical useLearning Linux and programming, desktop tasks, servers, networking, and electronics projects.Productivity, demanding applications, large storage, gaming, and general computing.Direct control of sensors, LEDs, motors, and other hardware with low power use.
Performance and storageMore limited than many modern computers; storage is often external or removable.Usually offers greater performance, memory, storage, and expansion.Usually has much less memory and processing capability, but often starts quickly and uses little power.
SetupRequires an operating system, power, storage, and usually peripherals or network access.Often supplied as a more complete ready-to-use system.Usually programmed from another computer and then runs its firmware.
Hardware interactionOffers GPIO while also supporting applications and network services.May need an expansion board or external controller for simple electronics work.Designed primarily for direct hardware control.

An Arduino is a common example of a microcontroller board. A microcontroller is a small programmable controller designed for direct hardware control, normally without a full desktop operating system. It is a good choice for a precise, low-power control task.

Raspberry Pi Pico is also a microcontroller board, despite sharing the Raspberry Pi name. It is not the same kind of computer as a Raspberry Pi board that runs Raspberry Pi OS. A conventional Raspberry Pi computer is better suited to Linux applications, networking, and multitasking. A Pico is better suited to embedded control, fast hardware timing, and simple battery-powered projects.

Operating Systems and Software

A Raspberry Pi needs an operating system installed on its boot media. The operating system manages the processor, memory, files, hardware, users, and applications.

Raspberry Pi OS is a common beginner operating system. It is based on Linux, an operating-system family used on servers, desktop computers, embedded devices, and many other systems. Raspberry Pi OS can provide a graphical desktop for windows, files, settings, web browsing, and programming. It can also be used from a command line, where you type commands to manage the system.

Other compatible Linux-based systems and specialized operating systems may be useful for particular projects, but compatibility and performance vary by board model. A system designed for a desktop computer may not support the processor architecture, drivers, or resources available on a particular Raspberry Pi.

Software options include Python and other programming tools, text editors, web servers, databases, networking utilities, media applications, and GPIO libraries. For an introduction to Linux concepts, see What Is Linux. For command-line practice, see Essential Linux Commands.

What Can You Do With a Raspberry Pi?

Project categoryTypical hardware or softwareSkills introducedDifficulty
Learning programmingRaspberry Pi OS, Python, a text editor, and the terminalVariables, conditions, loops, files, and debuggingBeginner
Basic desktop computingDisplay, keyboard, mouse, browser, and office or educational softwareFile management, web use, and operating-system navigationBeginner
GPIO electronicsLED, resistor, button, jumper wires, breadboard, and a GPIO libraryCircuits, pin numbering, input, output, and event-driven codeBeginner to intermediate
Home monitoringSensor, network connection, Python program, and a database or dashboardData collection, networking, logging, and visualizationIntermediate
Home server or network serviceLinux, Ethernet or Wi-Fi, storage, and a server applicationUsers, permissions, updates, services, and troubleshootingIntermediate
Robotics and automationSensors, motor controller, external power, GPIO, and control softwareFeedback, mechanical control, power planning, and program designIntermediate to advanced
Headless network computerNetwork connection and SSH from another computerCommand-line administration and remote accessBeginner to intermediate

Practical Examples

  • Beginner desktop: Install Raspberry Pi OS and use a monitor, keyboard, and mouse to learn files, web browsing, and introductory programming.
  • Python project: Write and run a small Python program. This demonstrates that the board is a general-purpose computer, not only an electronics controller.
  • GPIO LED: Use a suitable resistor and correct wiring to control an LED from software. Check the pinout and share a suitable ground connection.
  • Home monitoring: Connect a sensor, collect temperature or other readings, and display them locally or over a network.
  • Headless computer: Run the board without a directly attached display and connect remotely to practice command-line administration.

What You Need to Get Started

ItemRequired or optionalWhy it is neededSelection considerations
Raspberry Pi board or kitRequiredProvides the computer.Choose performance, ports, wireless features, size, power use, and availability based on the project.
Correct power supplyRequiredProvides stable power to the board.Use a reliable supply that matches the model's voltage, connector, and current requirements.
microSD card or supported storageRequiredHolds the boot files, operating system, and files.Use suitable, reliable storage with enough capacity for the planned software.
Display and cableRequired for a traditional first setupShows the graphical desktop and setup screens.Match the display input and the board's video connector.
Keyboard and mouseRequired for a traditional first setupAllow local interaction and configuration.USB or compatible wireless devices may work, depending on the model and setup.
Separate computer and imaging applicationUsually requiredWrites the operating-system image to the boot storage.Use an imaging application that supports the selected board and storage device.
Case and coolingOptional but often usefulProtects the board and can help manage heat.Ensure the case and cooling solution fit the exact model.
Electronics componentsOptionalSupport GPIO experiments.Begin with a breadboard, jumper wires, resistors, LEDs, buttons, and suitable sensors.

A headless setup runs and configures the Raspberry Pi without a directly attached monitor, keyboard, or mouse. You prepare the operating system with network and login settings, connect the board to a network, and administer it remotely. A local display is often simpler for a first experience, while headless operation is useful for servers and installations in difficult-to-reach locations.

Installing the Operating System

  1. Select an operating-system image appropriate for the board. Raspberry Pi OS is a common starting point.
  2. Insert the target microSD card into a separate computer.
  3. Open a supported imaging application, select the operating-system image, and select the correct target card. Verify the target carefully because writing an image normally erases the selected storage.
  4. If supported, optionally preconfigure the network, locale, keyboard preferences, user account, and remote-access settings.
  5. Write the image, safely eject the card, insert it into the Raspberry Pi, connect the required peripherals, and apply power.
  6. Complete the initial setup: create or confirm user credentials, set the locale and keyboard, join a network, and update software.

For related setup concepts, see Install Raspbian. The operating-system name and installation tools can change over time, so follow instructions appropriate to the selected board and image.

Basic Terminal Orientation

The terminal accepts text commands. These commands are useful for learning Linux, but administrative commands can change the entire system. The sudo command runs a command with elevated privileges, so read commands before approving them.

pwd                 # Show the current directory
ls                  # List files and directories
cd projects         # Change to the projects directory
mkdir experiments   # Create a directory
cp notes.txt backup.txt  # Copy a file
mv old.txt archive.txt   # Move or rename a file
sudo apt update     # Refresh available package information
sudo apt upgrade    # Install available package upgrades
  • pwd prints the path of the current working directory.
  • ls lists its contents.
  • cd changes directory.
  • mkdir creates a directory.
  • cp copies files or directories when used with the appropriate options.
  • mv moves or renames files and directories.
  • sudo apt update refreshes package information; it does not itself install upgrades.
  • sudo apt upgrade installs available package updates and may take time or require confirmation.

To finish a session safely, use the operating system's shutdown option or an appropriate shutdown command rather than simply removing power. More Linux command-line practice is available in Useful Terminal Commands and Shut Down the System.

Remote Access With SSH

SSH is a protocol for securely opening a command-line session on another computer over a network. For a headless Raspberry Pi, enable the SSH service only when needed, use a strong password or preferably key-based authentication, and limit access to trusted networks.

After the board joins the network, an SSH client on another computer can connect using the Raspberry Pi's hostname or network address. You then work in a remote terminal as if you were locally logged in. Remote access depends on network configuration; introductory networking material is covered in Computer Network Explained.

Choosing a Model

Model selection depends on the project rather than on the newest available board. Consider:

  • Performance: processor capability and memory affect desktop use, compilation, media handling, and multitasking.
  • Ports: count and type of USB, display, camera, and other connectors affect what can be attached directly.
  • Wireless capability: built-in Wi-Fi and Bluetooth can simplify portable or networked projects.
  • Physical size: a compact board may fit an enclosure or robot more easily.
  • Power use and cooling: more capable boards may require more power or better heat management.
  • Project requirements: check software compatibility, GPIO needs, storage, networking, and accessory support.
  • Availability and total cost: include the power supply, storage, case, cooling, cables, and project components.

Safe and Responsible Use

  • Use the correct voltage and a reliable power supply and cable for the exact board.
  • Handle the board by its edges where practical, and protect it from static discharge, moisture, and conductive surfaces.
  • Avoid short circuits between pins or components.
  • Power down, disconnect power, or follow appropriate project guidance before changing wiring.
  • Check the GPIO voltage limits and pin functions before connecting anything. Do not connect unsuitable signals directly to GPIO pins.
  • Use a resistor when required, such as when connecting a basic LED, and provide a suitable shared ground in a circuit.
  • Use external drivers or controllers for loads such as motors and relays rather than powering them directly from GPIO pins.

Troubleshooting Common Problems

SymptomLikely causesFirst checks
The board does not power on or repeatedly restarts.Inadequate or incompatible power supply, faulty cable, or power-hungry peripherals.Disconnect accessories, check the supply and cable, and verify that they meet the board's requirements.
No image appears on the display.Incorrect display input, cable or adapter issue, unsupported display configuration, or boot problem.Check the selected monitor input, connections, adapters, power indicators, and boot media before changing software settings.
The board does not boot from the microSD card.The image was not written correctly, the card is damaged or incompatible, or the boot configuration is incorrect.Rewrite the image to the correct card, verify the card, and check model-specific boot guidance.
The system is slow or unstable.Demanding workload, insufficient cooling, low-quality power or storage, or too many background tasks.Check temperature and power warnings, reduce workload, improve cooling, and test reliable storage.
A GPIO project does not work.Incorrect pin numbering, loose wiring, missing resistor or shared ground, or a program using the wrong pin.Compare the circuit with the board pinout, verify numbering in code, inspect every connection, and test one component at a time.

A Beginner Learning Path

  1. Identify the board: Find the power input, USB ports, display output, network connections, microSD slot, and GPIO header. Port locations and connectors differ between models.
  2. Prepare storage: Select a compatible Raspberry Pi OS image and write it to the microSD card.
  3. Boot and configure: Connect suitable power and peripherals, start the board, create credentials, set the locale and keyboard, and join a network.
  4. Update the system: Install available software updates and learn how to shut down safely.
  5. Learn Linux: Practice directories, files, permissions, programs, and the terminal.
  6. Write a small program: Start with Python and make a program that accepts input, performs a calculation, or writes a file.
  7. Try GPIO: Build a simple, low-voltage circuit such as an LED or button project, checking the pinout and wiring before applying power.
  8. Expand gradually: Move to sensors, network services, monitoring, or automation while documenting changes and testing one part at a time.

Expect some troubleshooting. Experimentation is part of learning, but separate software problems from power, storage, wiring, and networking problems. Change one variable at a time and keep notes about what you tested.

Key Terms

  • Raspberry Pi: A family of compact single-board computers used for learning, computing, and hardware projects.
  • Single-board computer: A functional computer built on one circuit board.
  • Raspberry Pi OS: A Linux-based operating system commonly used on Raspberry Pi computers.
  • microSD card: Removable flash storage commonly used to hold the operating system and files.
  • GPIO: General-purpose input/output pins for reading signals and controlling external electronic components.
  • Linux: An operating-system family used by Raspberry Pi OS and many other systems.
  • Headless setup: Running and configuring a Raspberry Pi without a directly attached monitor, keyboard, or mouse.
  • Power supply: The adapter and cable that provide stable power to the board.
  • HDMI: A display connection used to send video and audio to a monitor or television.
  • USB: A connection standard used for peripherals such as keyboards, mice, storage devices, and adapters.
  • Ethernet: A wired networking connection.
  • Microcontroller: A small programmable controller designed for direct hardware control, usually without a full desktop operating system.