# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Overview

When you buy a Raspberry Pi, it may or may not be sold with an SD card. The SD card is important because this is where the Raspberry Pi keeps its operating system and is also where you will store your documents and programs. &nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/002/846/medium800/learn_raspberry_pi_overview.jpg?1396787722)

![](https://cdn-learn.adafruit.com/assets/assets/000/024/656/medium800/learn_raspberry_pi_IMG_5646.jpg?1429721108)

Even if your Pi came with an SD card with an operating system on, it is a good idea to update it to the latest version, as improvements and bug fixes are going in all the time. Since putting the operating system onto an SD card wipes everything else off the card, it is worth considering using a USB flash drive for your documents, so that when you install a new version of the operating system, you don't have the complication of copying them off somewhere safe before reformatting the SD card.

If your Pi did not come with an SD card then the minimum size you should get is 8GB, but buy a bigger SD card if you think you will need the space. (If you're planning to store media files or work with other SD card images on your Pi, you probably need a bigger card.)

This lesson shows you how to create an SD card for your Raspberry Pi.

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## You Will Need

To prepare an SD card for your computer, you will need:

A 'regular' computer with a built-in SD card reader, or an add-on USB SD card reader. The instructions here are for Windows and Mac. You can pick up a [tiny microSD card reader/writer that is nice and fast and works with all USB ports](http://adafruit.com/products/939) at the Adafruit shop.

![](https://cdn-learn.adafruit.com/assets/assets/000/002/854/medium800/learn_raspberry_pi_ID939_LRG.jpg?1396787883)

An SD card at least 8GB in capacity. You can [pick one up that is tested and guaranteed to work with the Raspberry Pi](http://adafruit.com/products/102) at the Adafruit shop. (If buying elsewhere, remember that for the Pi 2,&nbsp; 3 and Zero you'll need microSD.)

![](https://cdn-learn.adafruit.com/assets/assets/000/002/855/medium800/learn_raspberry_pi_SD102_MED.jpg?1396787888)

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Raspberry Pi Imager

## What is Raspberry Pi Imager?

Once you have your Pi and SD card, the next step is to install an operating system onto the SD card. Previously this was a bit difficult, especially for beginners, because of varying main operating systems (macOS, Windows, Ubuntu, etc.) and their different methods of accessing the SD card.

[Now there's a new tool called Raspberry Pi Imager that does all the heavy lifting for you.](https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility/)

It's as simple as choosing the desired operating system, selecting the SD card, and hitting WRITE.

https://www.youtube.com/watch?v=J024soVgEeM

## Download Raspberry Pi Imager&nbsp;
Head [here](https://www.raspberrypi.org/downloads/), then download the application for your operating system by clicking the corresponding link.

Raspberry Pi Imager is supported by macOS, Windows and Ubuntu.

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.23.45_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/161/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.23.45_PM.png?1583873451)

## Using the software

Choose your OS and place on SD card

Once the software is downloaded, open up the application.

First, choose which operating system you'd like to put on the SD card. Most will go with Raspberry Pi OS but you have quite a bit of options here. For more on this topic, see **Choose your operating system** below.

Next, insert your SD card into your computer and select it inside the application.

_ **Power user trick:** press Control+Shift+X (Windows) or ⌘+Shift+X (Mac) to bring up the Advanced Options dialog, where you can configure essentials like WiFi_ before the card is even written, _rather than having to change all this on the Pi later._

When you have your software and sd card selected, go ahead and hit "WRITE". This will place the selected OS onto the SD card.

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.23.37_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/153/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.23.37_PM.png?1583873082)

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.24.56_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/155/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.24.56_PM.png?1583873135)

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.25.15_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/156/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_4.25.15_PM.png?1583873155)

![learn_raspberry_pi_operating-systems.png](https://cdn-learn.adafruit.com/assets/assets/000/129/080/medium640/learn_raspberry_pi_operating-systems.png?1711915656)

Depending on the size of the operating system you choose, this may take some time (10-15 min)

Finished!

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.02.56_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/170/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.02.56_PM.png?1583874992)

## Choose your operating system

There are a bewildering number of operating systems that you can install on your Raspberry Pi. If you are a beginner, you'll probably want to stick with one of the Linux distributions.

## Choose your distribution

Having decided you want to install Linux, that is not the end of the story. You now have to decide which distribution or 'distro' of Linux you want to install. Being an Open Source operating system, anyone can take one of the existing distributions an add things to it or configure it in a certain way before packaging it up as another distribution option for anyone to use. This is how the most common Raspberry Pi distribution, 'Raspbian', came into existence. The existing 'Debian' distribution was configured and kitted out with useful things like IDLE (a python-programming language development editor) and Scratch (a learn-to-program gaming system) to make it suitable for the Pi.

All of the Adafruit tutorials (and nearly every other tutorial online) will work with Raspbian, and nearly every Pi out there runs it.

## Erasing an SD card

In addition to uploading a number of pre-configured OSes, with Imager, you can also ERASE an SD card.

Just select ERASE from the operating system list, the SD card you'd like to erase and hit WRITE.

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.03.14_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/166/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.03.14_PM.png?1583874871)

![learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.03.31_PM.png](https://cdn-learn.adafruit.com/assets/assets/000/089/167/medium640/learn_raspberry_pi_Screen_Shot_2020-03-10_at_5.03.31_PM.png?1583874886)

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Balena Etcher

![](https://cdn-learn.adafruit.com/assets/assets/000/089/198/medium800/learn_raspberry_pi_image.png?1584023605)

Balena Etcher is the imager most people used before the Raspberry Pi Imager was written & released. It works very well and we think some people will continue to use it or perhaps already have it installed!

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Downloading an Image

The operating system that will be installed onto the SD card must be downloaded from the Internet. This will usually be a zip file that then extracts to a file of type .img an image file. Whatever image file you download, the actual installation process is the same.

# Choose your Operating System

There are a bewildering number of operating systems that you can install on your Raspberry Pi. If you are a beginner, you'll probably want to stick with one of the Linux distributions.

# Choose your Distribution

Having decided you want to install Linux, that is not the end of the story. You now have to decide which distribution or 'distro' of Linux you want to install. Being an Open Source operating system, anyone can take one of the existing distributions an add things to it or configure it in a certain way before packaging it up as another distribution option for anyone to use. This is how the most common Raspberry Pi distribution, 'Raspbian', came into existence. The existing 'Debian' distribution was configured and kitted out with useful things like IDLE (a python-programming language development editor) and Scratch (a learn-to-program gaming system) to make it suitable for the Pi.

All of the Adafruit tutorials (and nearly every other tutorial online) will work with Raspbian, and nearly every Pi out there runs it.

[Raspbian Download](http://www.raspberrypi.org/downloads/)
Additionally, Adafruit offers a growing set of tools for working with Raspbian installations, such as&nbsp;[the Adafruit Raspberry Pi Finder](../../../../the-adafruit-raspberry-pi-finder/overview), a GUI for configuring your Pi over the network. [The CircuitPython libraries](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi) can easily be installed on your Pi thanks to the adafruit-blinka package.&nbsp;

Whatever distribution you're installing, you'll probably have a zip file that looks something like one of these:

...open the .zip and extract the .img to your desktop.

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Making an SD Card – Using Windows

We really like using balenaEtcher for burning SD cards. Works great on any version of Windows, macOS and Linux. It will not over-write your backup disk drive, and can handle compressed images so you do not need to unzip them!

# **Step 1.**

Download Etcher from:&nbsp;[https://www.balena.io/etcher/](https://www.balena.io/etcher/)

[Download balenaEtcher](https://www.balena.io/etcher/)
![](https://cdn-learn.adafruit.com/assets/assets/000/037/649/medium800/learn_raspberry_pi_etcher.png?1480706374)

# **Step 2.**

Run the downloaded app to install!

![](https://cdn-learn.adafruit.com/assets/assets/000/037/650/medium800/learn_raspberry_pi_installer.png?1480706415)

You can start immediately, doubleclick the Etcher desktop icon, or select it from the Start menu

# **Step 3.**

Eject any external storage devices such as USB flash drives and backup hard disks. This makes it easier to identify the SD card. Then insert the SD card into the slot on your computer or into the reader.

# **Step 4.**

Run the Etcher program

![](https://cdn-learn.adafruit.com/assets/assets/000/037/652/medium800/learn_raspberry_pi_select_image.png?1480706577)

This will launch the following application.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/651/medium800/learn_raspberry_pi_select_image.png?1480706495)

# **Step 5.**

Select the image file by clicking **Select Image** you can select a compressed file such as a **.zip** or **.gz**

![](https://cdn-learn.adafruit.com/assets/assets/000/037/653/medium800/learn_raspberry_pi_select.png?1480706693)

# Step 6.

Etcher will automatically try to detect the SD drive, check the size to make sure its the right one

Then click **Flash!**

![](https://cdn-learn.adafruit.com/assets/assets/000/037/654/medium800/learn_raspberry_pi_burn.png?1480706799)

Check that you have the right device, as it will be reformatted, and then click Install.

It will take a few minutes to install, but once the SD card is ready, you will see the following.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/657/medium800/learn_raspberry_pi_done.png?1480707318)

That's all there is to it. Your SD card is ready for use in your Raspberry Pi.

# Faster writes

If you burn a lot of cards, speed it up by turning off **Validate write on success**

![](https://cdn-learn.adafruit.com/assets/assets/000/037/656/medium800/learn_raspberry_pi_validate.png?1480706860)

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Making an SD Card – Using a Mac

We really like using balena **Etcher** for burning SD cards. Works great on Mac OS X 10.9 or later, won't over-write your backup disk drive, and can handle compressed images so you do not need to unzip them!

## Mac OS Catalina Issues

If you are having issues running Etcher on the Catalina release of Mac OS, see the links below for more information and some suggested workarounds.

- [Issue 2833](https://github.com/balena-io/etcher/issues/2833)
- [Issue 2911](https://github.com/balena-io/etcher/issues/2911)
- [Balena forum post](https://forums.balena.io/t/balena-and-mac-catalina-not-working/38073)

Most success has been reported by simply running Etcher from the command line using sudo:

```none
sudo /Applications/balenaEtcher.app/Contents/MacOS/balenaEtcher
```

# **Step 1.**

Download Etcher from&nbsp;[https://www.balena.io/etcher/](https://www.balena.io/etcher/)

[Download Etcher](https://www.balena.io/etcher/)
# **Step 2.**

Open the downloaded disk image and drag the balenaEtcher application to the Applications folder. You can then eject the disk image.

![](https://cdn-learn.adafruit.com/assets/assets/000/075/472/medium800/learn_raspberry_pi_Screen_Shot_2019-05-08_at_3.34.47_PM.png?1557351367)

# **Step 3.**

Eject any external storage devices such as USB flash drives and backup hard disks. This makes it easier to identify the SD card. Then insert the SD card into the slot on your computer or into the reader.

# **Step 4.**

Run the Etcher application.

![](https://cdn-learn.adafruit.com/assets/assets/000/075/473/medium800/learn_raspberry_pi_Screen_Shot_2019-05-08_at_3.37.47_PM.png?1557351503)

The first time you run Etcher you’ll be asked to confirm the download. Click “Open” to continue.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/679/medium800/learn_raspberry_pi_3confirm.png?1480733697)

This will launch the Etcher application…

![](https://cdn-learn.adafruit.com/assets/assets/000/037/680/medium800/learn_raspberry_pi_4file1.png?1480733779)

# **Step 5.**

Select the SD card image file by clicking&nbsp; **Select Image.** &nbsp;You can choose&nbsp;a compressed SD image file such as a&nbsp; **.zip&nbsp;** or&nbsp; **.gz** or an uncompressed **.img** , it’s all good!

![](https://cdn-learn.adafruit.com/assets/assets/000/037/681/medium800/learn_raspberry_pi_4file2.png?1480733845)

# **Step 6.**

Etcher will automatically try to detect the SD drive.&nbsp;If you don’t have an SD card currently inserted, you’ll be prompted to connect one.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/682/medium800/learn_raspberry_pi_5drive.png?1480734002)

Check the disk size to make sure its the right one, that it’s not overwriting your main drive or anything nasty.&nbsp;

Then click&nbsp; **Flash!** _A-ah!_

![](https://cdn-learn.adafruit.com/assets/assets/000/037/683/medium800/learn_raspberry_pi_6flash.png?1480734053)

Etcher will work for a few minutes to “burn” the SD image to the card. You’ll see&nbsp;a progress bar as it works.&nbsp;This is about the time you’ll wish you’d splurged on a high-speed card.

Once the SD card is ready, you will see the following:

![](https://cdn-learn.adafruit.com/assets/assets/000/037/684/medium800/learn_raspberry_pi_7complete.png?1480734065)

The card will be unmounted automatically, so you can pull it out now and use it in your Raspberry Pi.

# **Faster Writes**

If you find yourself burning a lot of SD cards, you can speed things up by clicking the gear icon at the top-right, then turn off the “Validate write” option. I’ve written _hundreds_ of cards and only had _one_ fail validation.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/685/medium800/learn_raspberry_pi_8settings.png?1480734077)

# Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

## Test & Configure

![](https://cdn-learn.adafruit.com/assets/assets/000/002/856/medium800/learn_raspberry_pi_overview.jpg?1396787894)

If you plan to use multiple SD cards, it is not a bad idea to label the card, or for microSD cards label the little plastic case they usually come in.

Testing the card is easy - insert it into your Pi, then connect a keyboard to the USB port and a NTSC/PAL TV to the composite port or an HDMI monitor to the HDMI Port. Then power it by connecting a Micro USB cable to the Pi and powering it via a computer or a USB wall charger.

For Raspbian, you should see something like the following, an Adafruit/Raspberry logo in the top left, and a ton of text filling up the screen:

![](https://cdn-learn.adafruit.com/assets/assets/000/002/857/medium800/learn_raspberry_pi_adafruit_833.jpg?1396787904)

  
In the next tutorial, you will find out how to configure your Raspberry Pi the first time you boot it up.  
[Click Here for the Next Lesson](http://learn.adafruit.com/adafruits-raspberry-pi-lesson-2-first-time-configuration)

## Featured Products

### Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM

[Raspberry Pi 3 - Model B+ - 1.4GHz Cortex-A53 with 1GB RAM](https://www.adafruit.com/product/3775)
The Raspberry Pi 3 Model B is the most popular Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 3 better? How about a&nbsp;_faster_ processor, 5 GHz WiFi, and updated Ethernet chip with PoE capability?...

In Stock
[Buy Now](https://www.adafruit.com/product/3775)
[Related Guides to the Product](https://learn.adafruit.com/products/3775/guides)
### Raspberry Pi 2 Model B Starter Pack - Includes a Raspberry Pi 2

[Raspberry Pi 2 Model B Starter Pack - Includes a Raspberry Pi 2](https://www.adafruit.com/product/2380)
Why not trick out your fresh new board with some&nbsp;accessories? The Pi 2 is a big deal - a big, big deal. &nbsp;It has an upgraded ARMv7 multicore procssor and a full Gigabyte of RAM - meaning you're going to see ~2x the performance on processor-upgrade only and 4x on average for...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2380)
[Related Guides to the Product](https://learn.adafruit.com/products/2380/guides)
### Budget Pack for Raspberry Pi 1 Model B (Doesn't include RasPi)

[Budget Pack for Raspberry Pi 1 Model B (Doesn't include RasPi)](https://www.adafruit.com/product/965)
An optimized collection of parts and pieces to experiment with Raspberry Pi at home, school or work. Great for students and those that want to get their feet wet, no soldering required! **THIS PACK DOES NOT INCLUDE A RASPBERRY PI 1 MODEL B and is NOT compatible with Model B+ or Raspberry Pi...**

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/965)
[Related Guides to the Product](https://learn.adafruit.com/products/965/guides)
### USB MicroSD Card Reader/Writer - microSD / microSDHC / microSDXC

[USB MicroSD Card Reader/Writer - microSD / microSDHC / microSDXC](https://www.adafruit.com/product/939)
This is the cutest little microSD card reader/writer - but don't be fooled by its adorableness! It's wicked fast and supports up to 64 GB SDXC cards! Simply slide the card into the edge and plug it into your computer. No drivers are required, it shows up as a standard 'Mass...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/939)
[Related Guides to the Product](https://learn.adafruit.com/products/939/guides)
### SD/MicroSD Memory Card - 16GB Class 10 - Adapter Included

[SD/MicroSD Memory Card - 16GB Class 10 - Adapter Included](https://www.adafruit.com/product/2693)
Add speedy mega-storage in a jiffy using this 16 GB Class 10 micro-SD card. It comes with a SD adapter so you can use it with any of our shields or adapters! Preformatted to FAT so it works out of the box with our projects. Works great with any device in the Adafruit shop that uses micro-SD...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2693)
[Related Guides to the Product](https://learn.adafruit.com/products/2693/guides)
### SD/MicroSD Memory Card (8 GB SDHC)

[SD/MicroSD Memory Card (8 GB SDHC)](https://www.adafruit.com/product/1294)
Add mega-storage in a jiffy using this 8 GB class 4 micro-SD card. It comes with a SD adapter so you can use it with any of our shields or adapters. Preformatted to FAT so it works out of the box with our projects. Tested and works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1294)
[Related Guides to the Product](https://learn.adafruit.com/products/1294/guides)
### Raspberry Pi 1 Model B Starter Pack - Includes a Raspberry Pi

[Raspberry Pi 1 Model B Starter Pack - Includes a Raspberry Pi](https://www.adafruit.com/product/1014)
You want to get hacking with your Pi fast, right? Get everything you need to start with the Adafruit Starter Pack for Raspberry Pi. It's the perfect accompaniment to your new Pi, everything you need to boot up your Pi Model B and get going. **We pre-assemble the Cobbler for you, no...**

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1014)
[Related Guides to the Product](https://learn.adafruit.com/products/1014/guides)
### Low-profile microSD card adapter for Raspberry Pi

[Low-profile microSD card adapter for Raspberry Pi](https://www.adafruit.com/product/966)
Make your Pi a little slimmer with this microSD card adapter board. It slides in where the SD card goes but is half the length. Pop in a microSD card for a sleeker machine. The microSD card holder is a push-push type so you can push on the edge that sticks out to remove the card when...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/966)
[Related Guides to the Product](https://learn.adafruit.com/products/966/guides)

## Related Guides

- [Adafruit's Raspberry Pi Lesson 4. GPIO Setup](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup.md)
- [Adafruit's Raspberry Pi Lesson 2. First Time Configuration](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-2-first-time-configuration.md)
- [Press Your Button for Raspberry Pi](https://learn.adafruit.com/press-your-button-for-raspberry-pi.md)
- [NeoPixels on Raspberry Pi](https://learn.adafruit.com/neopixels-on-raspberry-pi.md)
- [Adafruit's Raspberry Pi Lesson 3. Network Setup](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup.md)
- [Adafruit Ultimate GPS with gpsd](https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi.md)
- [Adafruit's Raspberry Pi Lesson 13. Power Control](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-13-power-control.md)
- [Running Minecraft on a Raspberry Pi](https://learn.adafruit.com/running-minecraft-on-a-raspberry-pi.md)
- [Adafruit's Raspberry Pi Lesson 6. Using SSH](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh.md)
- [Introducing the Raspberry Pi Zero](https://learn.adafruit.com/introducing-the-raspberry-pi-zero.md)
- [Drive a 16x2 LCD with the Raspberry Pi](https://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi.md)
- [Windows IoT Core Application Management](https://learn.adafruit.com/windows-iot-application-management.md)
- [Setting up a Raspberry Pi as a WiFi Access Point](https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point.md)
- [Debugging with the Raspberry Pi WebIDE](https://learn.adafruit.com/debugging-with-the-raspberry-pi-webide.md)
- [Node.js Embedded Development on the Raspberry Pi](https://learn.adafruit.com/node-embedded-development.md)
