How to Use a USB SD Card Reader on Raspberry Pi?
A USB card reader can be convenient if you need to read or write on a different SD card than the one running your system. For example, if you need to create a backup of your Raspberry Pi or transfer photos from a camera. But as with many things on Linux, it’s not especially easy to use. In this article, I’ll show you how to do it.
On most operating systems, a USB SD card reader will be detected as a USB drive. On Raspberry Pi OS with Desktop, it will be mounted automatically and accessible via the file explorer. On Raspberry Pi OS Lite, the mount command can be used to access the files manually.
In this article, we’ll learn how to use a USB card reader, whatever your operating system is. And I’ll give you a few ideas of things you can do with that kind of adapter.
If you’re feeling lost in all the Raspberry Pi jargon, I’ve got something to help you out. I’ve created a free glossary that explains all the essential terms and abbreviations in a way that’s easy to understand. It’s a great resource to have by your side. Get your free copy here.
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now
How Do I Use a USB Card Reader?
A USB card reader is a small device, like a USB key, that has a MicroSD card slot on it. The USB part is just an adapter, while the storage is on the SD card itself. So, it can be used the same way as a USB drive (plug & play).
The Basics
Just to be clear, I’m talking about a device like this, which looks like a standard USB key. But for the Raspberry Pi, I would recommend an SD card reader with a USB cable (like this one) because we don’t want the adapter to block access to the other USB ports.
So, start by inserting your MicroSD card (here’s my current favorite) into the reader slot, and plug the reader’s USB connector into a free USB port on your Raspberry Pi. Then, jump to one of the sections below depending on what operating system you’re using.
Using a Card Reader on Raspberry Pi OS with Desktop
We’ll start with the easiest way. If you have an operating system with a GUI, like Raspberry Pi OS Desktop, using your SD card reader won’t be very complicated.
On Raspberry Pi OS with Desktop, your SD card reader will be mounted automatically. Once plugged in, you’ll see an icon appear on your desktop. Open your file explorer, and you’ll also see something like this appear:
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Download now
As you can see, the system detected the SD card reader and automatically mounted the partitions. You can access your files from there. It should be accessible with read-write permissions (if not, there is probably an issue with your SD card or a security lock on your adapter).
If your SD card isn’t formatted yet, you can use a tool named “Gparted” to easily format it from your Raspberry Pi. I explain all the steps in this article if you need some help. You can also prepare the SD card on your computer if you prefer, and any operating system includes tools to do this.
Before unplugging your USB card reader, use the eject symbol in the file explorer to unmount it cleanly. Proper ejection will prevent file corruption if an operation was still in progress.
Using a Card Reader on Any Linux Distribution
If you are connected via SSH, or if you’re using a minimal distribution like Raspberry Pi OS Lite, mounting an SD card reader might be a more complicated process. But no worries because I’ll show you how to do it step-by-step.
In fact, this process will be the same as with any USB drive. Your system will automatically detect a new drive connected, but you have to mount it before you can access it.
The first step will be to identify the drive name:
- Use fdisk to display all the detected devices on your Raspberry Pi:
sudo fdisk -l
- In general, the USB card reader will be the last one. You should get something like this:
So, my USB card reader is /dev/sda and there are two partitions on it: sda1 and sda2.
It also lets me check the file system used on each partition.
We have everything we need to mount the partition:
- If you don’t have one yet, start by creating a temporary file folder to mount the partition. For example:
sudo mkdir /media/sdcard
- Then mount the SD card on this folder, in my case:
sudo mount /dev/sda2 /media/sdcard
Replace the first parameter with the partition name you found from the previous step. - You should now be able to read and write to your SD card. For example:
ls /media/sdcard
sudo touch /media/sdcard/test
Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.
The method I showed you is the basic way to do it, but there are more options available, depending on the file system, user permissions, etc. You can find more details in this article, or check out my video below.
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now
If you are looking for exclusive tutorials, I post a new course each month, available for premium members only. Join the community to get access to all of them right now!
What Can You Do with a USB SD Card Reader?
You now have access to your files via your SD card reader. Great! But what can you do with it? Here are some ideas of what you can do next.
Transfer Files
I think the most common goal of using a USB card reader is to transfer files.
As I mentioned in the introduction, most cameras use SD cards. So, if you need the files on your Raspberry Pi, a USB card reader will be perfect.
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Download now
You can also use the same adapter to transfer files from one Raspberry Pi to another, or even to your computer. Basically, you can use it like a USB drive.
Create a Backup of Your Raspberry Pi
Another thing that can be really useful is to create backups of your Raspberry Pi with a USB card reader.
Sure, you can use it like a USB drive and copy only critical files over, but there’s a great tool already available on Raspberry Pi OS Desktop: SD Card Copier. It allows you to duplicate the current SD card (running your operating system) to another SD card (plugged into your USB card reader).
I have an entire article about the best strategies to create backups of your Raspberry Pi, and it’s one of the most powerful ways to create backups. If anything happens to your system (or if you lose your SD card), you can use the copy get the same setup as you had before.
Extra Storage
Using an USB card reader is also a good way to add extra storage to your Raspberry Pi installation. In general, it’s also a good practice to keep user files on a different partition (or drive) from the main system. This way, if anything corrupts the system, your data stays safe.
So, you can have Raspberry Pi OS running on the main SD card, and your documents on the SD card reader. If you take this route, I would recommend using this kind of disk instead, as it’s way faster and more reliable. But as a budget solution, a USB card reader works just fine.
Whenever you’re ready, here are other ways I can help you:
The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.
You can also find all my recommendations for tools and hardware on this page.
Useful article, thank you the interesting article