Now over four years old, the Raspberry Pi, a cheap credit-card sized computer, has taken the computing and DIY world by storm. Read on as we guide you through everything from buying to powering to running the tiny dynamo.
What Is the Raspberry Pi?
The Raspberry Pi is a credit-card sized computer designed and manufactured by the Raspberry Pi Foundation, a non-profit organization dedicated to making computers and programming instruction as accessible as possible to the widest number of people.
Although the original mission of the Raspberry Pi project was to get inexpensive computers with programming capabilities into the hands of students, the Pi has been embraced by a diverse audience. Tinkers, programmers, and DIYers across the globe have adopted the tiny platform for projects ranging from recreating retro arcade cabinets to controlling robots to setting up cheap but powerful home media devices.
Introduced in 2012, the original Raspberry Pi (what we now refer to as the Raspberry Pi 1 Model A) featured a system-on-a-chip setup built around the Broadcom BCM2835 processor–a tiny but fairly powerful mobile processor commonly used in cellphones. It included a CPU, GPU, audio/video processing, and other functionality all on a low-power chip paired with a 700Mhz single core ARM processor. Over the intervening years the foundation has released multiple revisions (switching out the Broadcom chips for improved versions and upping the CPU power with a 1.2GHz quad-core chip).
Although the Pi is an amazing little device that has grown by leaps and bounds since its introduction, it’s important to emphasize what the Raspberry Pi is not. The Raspberry Pi is not an outright replacement for your desktop computer or laptop. You cannot run Windows on it (at least not the traditional version of Windows you know), although you can run many distributions of Linux—including distributions with desktop environments, web browsers, and other elements you would expect in a desktop computer.
The Raspberry Pi is, however, an astoundingly versatile device that packs a lot of hardware into a very inexpensive body and is perfect for hobby electronics, DIY projects, setting up an inexpensive computer forprogramming lessons and experiments, and other endeavors.
What’s on the Raspberry Pi Board?
In the early years of the Pi foundation, the Raspberry Pi came in two versions at two different price points: the Model A ($25) and Model B ($35). If you needed less hardware (the Model A had one less USB port, no Ethernet port, and half the RAM) you could save ten bucks.
As manufacturing costs fell and the Pi gained more and more attention, they were able to increase the hardware specs of the device significantly while keep the cost the same–eventually unifying all models with the introduction of the Raspberry Pi 2 in 2015 and the Raspberry Pi 3 in 2016. Put another way: the best Raspberry Pi available at any given time has always cost $35. So what do you get when you buy a $35 credit card sized computer?
The current generation Raspberry Pi 3, seen above, sports the following hardware:
1. 2 Ghz ARM processor Systems-On-a-Chip (SoC) with integrated 1GB RAM. 1 HDMI port for digital audio/video output 1 3. 5mm jack that offers both audio and composite video out (when paired with an appropriate cable). 4 USB 2. 0 ports for connecting input devices and peripheral add-ons. 1 microSD card reader for loading the operating system. 1 Ethernet LAN port. 1 Integrated Wi-Fi/Bluetooth radio antenna. 1 microUSB power port. 1 GPIO (General Purpose Input/Output) interface.
What the heck is a GPIO? The Raspberry Pi comes with a set of 26 exposed vertical pins on the board. These pins are a General Purpose Input/Output interface that is purposely not linked to any specific native function on the Raspberry Pi board.
Instead, the GPIO pins are there explicitly for the end user to have low-level hardware access directly to the board for the purposes of attaching other hardware boards, peripherals, LCD display screens, and other hardware devices to the Pi. For example, if you wanted to take an old arcade controller and wire it directly to your Raspberry Pi to give your arcade a more authentic feel, you could do so using the GPIO interface.
Although we will not be using the GPIO header in today’s “getting started” tutorial, we do take advantage of it in other tutorials, like our Raspberry Pi LED indicator build that uses an LED breakout board attached to the GPIO header.
Where to Buy the Raspberry Pi
There are multiple versions of the Pi, but if you’re just getting started, you should absolutely buy the most current generation of the device–the Raspberry Pi 3. Practically every old Pi tutorial on the internet still works with the older models, but many of the projects you may wish to undertake (especially if you want to use the Pi as a video game emulator or the like) really benefit from the newer hardware.
In rare instances, however, you may want to hit up eBay to buy an older and cheaper Pi model. Our tutorial on turning a Pi unit and an LED board into a weather indicator, for example, doesn’t need a beefy new Pi unit and works just fine on the original 2012-era Raspberry Pi 1 Model A.
The Other Stuff You’ll Need
The Raspberry Pi is just a bare board–it doesn’t come with a case, any cables, or even a power source. So, you’ll have to purchase these things yourself along with your Pi. Here’s the other stuff you’ll need to buy (if you don’t already have it lying around).
A stable power source: The Raspberry Pi draws its power from a microUSB port and requires a microUSB-to-AC adapter. Because the Pi is a micro computer and not simply a cellphone getting a battery topped off, you need to use a high quality charger with stable power delivery that provides a consistent 5v with at least 700mA minimum output for older model units and 2.5A for the Pi 3.
Here’s a chart, courtesy of the Pi Foundation, outlining suggested and minimum power requirements.
Using a low-quality or under-powered charger is the number one source of system instability problems and frustration with the Raspberry Pi. You can stave off a pile of future headaches by simply getting a very high quality power source, preferably one designed for the Pi, right out of the gate. We recommend the CanaKit brand 5V 2.5A power supply ($10). It’s built specifically for use with the Pi, it can supply enough stable power for the oldest to the newest units, and it won’t leave you with boot issues or corrupt data like some random cellphone charger from your office drawer might.
A case: The Pi ships naked; you are going to need a proper case to enclose it. You can pick up an acrylic/plastic case for around $10-25, or go the more creative route and craft your own case (as many did shortly after the Pi was released).
When you’re shopping, be careful to check you’re purchasing the right case for you model. Significant changes to the Raspberry Pi board over the last few years, including the movement and outright removal of certain ports, means older cases won’t fit newer models.
A 4GB+ SD card: The older Pi units used a full size SD card but the Pi 2 and Pi 3 use microSD cards. The Raspberry Pi Foundation recommends, at minimum, a 4GB Class 4 SD card. But since SD cards are cheap these days, we recommend going for at least an 16GB Class 10 SD card for an older Pi or a 16GB Class 10 microSD card for the newer models. You may have one lying around already, but not all SD cards will necessarily work–check out this table from elinux.org to see a list of tested working (and not working) cards for the Pi.
Audio/Visual cables: If you’re connecting your Pi to an HDTV or newer computer monitor with HDMI support, you will need an HDMI cable–all PI units support HDMI output. For digital video to a standard computer monitor that lacks an HDMI port, you will need an HDMI to DVI cable for the video signal and a 3.5mm stereo cable for the sound (as you’ll lose the sound in the HDMI to DVI conversion).
Some Pis also have analog outputs for older TVs. If you are connecting and older Pi to an analog television set, you will need an RCA cable for the video and a 3.5mm stereo cable for the sound. You don’t need to purchase a specific RCA cable for the task, you could even use a yellow-red-white tri-cable you have laying around—just make sure to match up the colors on both ends of the cable when you plug it in.
If you need to connect a newer Pi unit to an SD/analog video source you will need to purchase an adapter cable known as a 3.5mm to RCA adapter or a TRRS AV breakout cable. Because such cables are notorious for being out of spec/standard and not working with the device you want, we highly recommend just picking up this cheap and highly reviewed unit that is known to be compatible with the Raspberry Pi.
An Ethernet cable or Wi-Fi adapter: Network connectivity isn’t an absolute necessity for the Pi, but it makes updating (and downloading) software so much easier and gives you access to a wide variety of network-dependent applications. And obviously, if your project relies on being connected to your network or the internet, you’ll need Wi-Fi or Ethernet.
All versions of the Pi have an Ethernet port onboard, so you can just plug in an Ethernet cable and go. If you want to use Wi-Fi, the Pi 3 has Wi-Fi built in. If you have an older Pi, you can buy one of the many micro Wi-Fi adapters compatible with the Pi. We have had great success with the tiny Edimax EW-7811Un adapter and have used it in multiple builds.
A Mouse and Keyboard: Even if your ultimate goal is to build a headless file server or other no-input-peripherals/monitor device, you will still need a mouse and keyboard to get your Pi up and running.
Any standard wired USB keyboard and mouse should work without any problems with your Raspberry Pi. There is one caveat to that statement, however: per USB design specifications, USB-based keyboards and mice should draw less than 100mAh of power but many models disregard that specification and draw more.
On older Pi units, this extra draw is problematic, as the USB ports were notoriously fussy. If you find that your peripherals are drawing more than 100mAh each, you will need to use a powered USB hub (see below). On newer models this should be less of a problem as the USB ports are significantly improved and the units user bigger power supply units.
You may find it useful to check out this large list of verified Pi-compatible peripherals maintained by eLinux.org.
A powered USB hub (optional): If your peripherals are out of spec or you need to attach more than two devices (such as a keyboard, mouse, and USB Wi-Fi adapter), you will need an external USB hub with its own power source.
We tested all the powered hubs we had laying around the office with the Pi—from nice brand-name Belkin powered hubs to no-name hubs—and had no problems with any of them. That said, we would recommend checking your existing hub or potential purchase against the hub section of the aforementioned eLinux peripheral list.
How to Install an Operating System on the Raspberry Pi
Now that we have assembled all the requisite hardware, Pi and peripherals alike, it’s time to get down to the business of loading an operating system onto your Pi. No matter what project you’re doing, installing an operating system on the Pi will generally follow the same procedure.
Unlike a traditional computer where you have a BIOS, a drive that supports removable media (such as a DVD drive), and a hard drive inside the computer, the Raspberry Pi simply has an SD card reader. As such, you are not going to follow the traditional computer-setup route of inserting a boot disk and installing your operating system to an internal storage device. instead, we are going to prepare the SD card on a traditional computer, and load it into the Raspberry Pi for further unpacking/tweaking.
Step One: Choose and Download Your Operating System
If you’re working on a specific project, you may already know what operating system you need to download. If you’re just looking to tinker, you’ll probably want a general purpose Linux distribution for the Pi. While there are a wide variety of Linux distributions available for the Pi, the distribution we are going to use in our example is the best-supported and most stable: Raspbian, a version of Debian Linux optimized for the Raspberry Pi.
For this step, you will need a separate computer with an SD card reader.
First, start by grabbing a copy of Rasbian from the Raspberry Pi Foundation. There are two versions of Rasbian: “Rasbian Jessie with Pixel” and “Rasbian Jessie Lite”. Pixel is the new (and very pretty) desktop interface the Raspberry Pi Foundation released in the Fall of 2016. The lite version does not have the more GPU hungry Pixel desktop and retains the old (and rather ugly) previous Rasbian desktop system. Unless you have older hardware and require the lite version, we suggest you download the “with Pixel” edition.\
Step Two: Write the OS Image to Your SD Card
Now that you’ve downloaded Raspbian, you need to write the image to your SD card. Etcher, a free program for Windows, macOS, and Linux users makes the process simple.
First, plug your SD card into your computer. Next, fire up Etcher.
Flashing Raspbian is a simple three-step process:
Under “Select Image,” point Etcher to the Raspbian IMG zip file you downloaded earlier. Under “Select Drive,” pick out your SD card from the list of options. Note that your system drives will not show up as an option, but any external hard drives you have plugged in might. If you’re unsure which drive is which, unplug all external drives save for the SD card you want to write to. Finally, click “Flash!”, and your SD card will be ready for use in no time.
Etcher is a very streamlined program that makes the process a lot easier. Advanced users might prefer the command line method, which is outlined over at raspberrypi.org for curious macOS and Linux users.
Step Three: Put Your SD Card in the Pi and Start It Up
Now, it’s time to start up your Pi for the first time. Attach all the necessary cables and peripherals to your Raspberry Pi except for the power cable—this includes the HDMI or RCA cable, the USB hub, the Ethernet cable, and anything else you’ll need.
Once you have all the cables attached to both the Pi and their respective destinations, insert the SD card. After the SD card is seated firmly, insert the microUSB power cable. There is no power button on the Pi–as soon as you plug in the power cable, it will begin booting up.
Almost immediately, you will see the boot sequence go scrolling rapidly by—similar to the view above. If you’re running the Pixel version of Rasbian Jessie, however, the view will quickly be replaced by a simple splash screen:
Seconds later, you’ll be kicked over to the Pixel desktop when the boot process is complete.
Congratulations, you’ve successfully booted up your Pi for the first time. For those of you familiar with the early versions of Debian on the Raspberry Pi and its very spartan desktop, you’ll immediately not how nice this looks by comparison. It’s like we’re computing in the 21st century!
Next, we’ll teach you how to configure Raspbian on your Pi.
Configuring Raspbian on Your Pi
Now that you’re up and running, it’s time to configure your network, update the software, and otherwise get Raspbian ready for use in your projects.
Connecting to Wi-Fi
If you’re connected to your home network via Ethernet, jump to the next section “Testing the network”. If you need to configure the wireless connection, look for the networking icon in the upper right corner of the screen and click on it:
Select the wireless network you wish to connect to from the drop down menu.
Enter your Wi-Fi password in the pop up box and then confirm that the network icon changes from the no connection icon to the Wi-Fi icon.
Time to double check the network connection by confirming we can connect to the web.
Testing the Network
Now that you have configured the Wi-Fi connection (or jumped right to this section because you’re using Ethernet) it’s time to test your connection. What better way to test the connection than to fire up the browser and visit How-To Geek?
From the desktop, click on the Raspberry Pi menu icon located in the upper left corner, then navigate to Internet > Chromium Web Browser.
Launch Chromium by clicking on it and then type in www.howtogeek.com:
Success! Not only do we have network connectivity, but How-To Geek look just as good on the lightweight Pi as it does on a full-fledged desktop. This will likely be the first of many times you are surprised and pleased with just how capable your new little microcomputer is.
Updating the Software
Before you start digging into your Pi, it’s a good idea to do a basic software update. We have setup the network, we have tested the connection, and now is a perfect time to do a system-wide software update.
Although the interface as come a long way on the Pi and Pixel is absolutely beautiful compared to the old desktop, you still need to get your hands dirty now and then in the terminal–and updating is one of those times. Click on the terminal icon in the upper left corner of the screen to launch the terminal.
At the terminal, enter the following command:
This combination command instructs Raspbian to search available software repositories for system and software updates and upgrades. As any such updates are discovered, you will be prompted to approve or disapprove the changes with the Y and N keys.
Unless you have a compelling reason to skip an update (which at this point in the game we don’t), just hit the Y key to confirm all the changes as they appear. Even on a brand new installation where you’re using the newest image from the Raspberry Pi foundation, expect to kill a good 20-30 minutes as Rasbian churns through relevant updates.
Additional Raspberry Pi Resources and Projects
Over the years since we wrote the original version of this Raspberry Pi guide, we’ve had a ton of fun using the Raspberry Pi as the foundation of dozens of projects. At any given time, we typically have at least a half dozen Pi units up and running. You can search through the How-To Geek Raspberry Pi archives for the full run down, but here’s a taste of some of our favorite projects.
Hands down, we’ve gotten the most mileage out of the Pi by turning it into a media center for our all local and streaming media needs. Every TV in our entire house (guest room included!) has a Pi hooked up to it.
Want to play the beefy video games your desktop computer can handle but on your living room TV instead of at your desk? You can do that too by rolling a Pi into a streaming Steam Machine. Need a more practical project? You can turn a Pi and an external hard drive into a networked backup station for all your local file backup needs.
But really, that’s just the tip of the iceberg and we’re sure you’ll find plenty of ideas both in the HTG archive and by searching the web.
If you want some further reading, here are some excellent links related to the Raspberry Pi:
The Official Raspbian Documentation: From tweaking your config. txt to installing media players, Raspbian’s user documentation is a handy reference. The Official Raspberry Pi Blog: If you keep an eye on nothing else Raspberry Pi related, keep an eye on the official blog. They’re constantly posting updates on new Pi developments, fun projects Pi fans have sent in, and other pieces of interest to Pi enthusiasts. While you are checking out the blog, don’t forget to make a stop at the Official Forums. MagPi: The Unofficial Raspberry Pi Magazine: Published around eight times a year, MapPi is a free and polished electronic magazine for Pi hobbyists. Raspberry Pi Disk Images: Experimenting with Raspberry Pi distributions is as simple as grabbing another cheap SD card and loading it up with a fresh image. Raspberry Pi Disk Images is a handy index of current Pi-friendly Linux and Android distributions. eLinux. org’s Verified Peripheral List: Although we mentioned this one earlier in our tutorial, it’s worth mentioning again. If you are trying to figure out why an existing piece of hardware won’t work with the Pi or would like confirmation that a piece of hardware you’re looking at will likely work with your Pi, it’s an invaluable resource.
Have a Raspberry Pi project to share? Have a request for a Pi-oriented tutorial? Shoot us an email at tips@howtogeek.com or sound off in the comments.