5 Ways to Copy Data From a Raspberry Pi to a PC

Christian Cawley 09-03-2017

You’ve had success with your latest Raspberry Pi project. Perhaps you’re using it to create photos, music, or even video? Whatever the case, at some point you’re going to want an easy way to get the data off the Pi’s SD card and onto your PC’s HDD.


This can be tricky.

With virtually no support from cloud services, the answer comes in the form of removable media, email, and local network tricks. If you’ve ever had to copy data to or from a Raspberry Pi and run into problems, these five methods should help you out in future.

1. Send Data via Email

This is probably the most obvious option — it’s certainly the first thing I tried. By accessing the Raspberry Pi’s default email client (Claws Mail as of the PIXEL desktop version of Raspbian Jessie), it’s a simple task to setup your email account, add an attachment, and send the data.

5 Ways to Copy Data From a Raspberry Pi to a PC muo diy raspberrypi transferdata email

You might prefer to access Gmail via the Chromium web browser — either option is fine.


How you send the email is up to you. If you’re using Gmail, you’ll be able to save the message as a draft. Then when you sign into Gmail on your main PC, it will be there. Otherwise, if you’re using an email client, just email it to your own address, or a second email account you have access to.

If you don’t have a second email account but have a Facebook account, then you have a Facebook email account. In a squeeze, send the data to this.

2. Access Cloud Storage in the Browser

Another obvious-but-slow option is to access one of your cloud accounts and sync data this way. Unfortunately, no well-known cloud services offer apps for the Raspberry Pi, so your best bet is to upload your files via the Chromium browser.

But which service should you use?


Dropbox and Box are both available via the browser, but are slow. OneDrive and Google Drive, meanwhile, can barely be used. We’d suggest sticking to whichever you find the most useful.

3. Use a USB Drive

Another sensible choice is to use a USB drive. Simply insert a formatted drive into a spare USB slot in your Raspberry Pi, and wait for it to appear in the Raspbian file manager. If you’re using an older Pi or a Raspberry Pi Zero and are short of USB ports, then it’s time to employ a USB hub. While a standard USB hub will be fine for a USB flash device, note that a powered hub will be needed for devices that will draw power from the Pi.

5 Ways to Copy Data From a Raspberry Pi to a PC muo rpi usb stick

With the USB drive inserted, it should automatically mount. If not, you’ll need to mount it manually. Begin by finding its unique ID:

ls -l /dev/disk/by-uuid/

Typically you’ll find an entry called sda1 (although this may differ), so keep a note of the name before proceeding.

Next, create a mount point. This is essentially a directory that will display the contents of the drive.

sudo mkdir /media/usb

(You don’t have to call it “usb” but it helps.)

Next, ensure the Pi user owns the folder. Otherwise, you won’t be able to view the contents!

sudo chown -R pi:pi /media/usb

You can then mount the drive with:

sudo mount /dev/sda1 /media/usb -o uid=pi,gid=pi

Once you’re done, you can easily copy files to the USB drive and, after safely ejecting, copy them to your main computer. To manually unmount use:

sudo umount /media/usb

4. Send and Receive Data With SCP

A little complicated to get working, the idea with this is that you can use the command line to send and receive data between your Raspberry Pi and your PC.

A command called scp (Secure Copy Protocol) makes this possible. To use it, you’ll first need to establish an SSH connection to your Raspberry Pi Setting Up Your Raspberry Pi For Headless Use With SSH The Raspberry Pi can accept SSH commands when connected to a local network (either by Ethernet or Wi-Fi), enabling you to easily set it up. The benefits of SSH go beyond upsetting the daily screening... Read More . This works best for Linux, as Windows users will need to install an SSH client to make it work. Once connected, in Linux, type:

scp pi@

This uses the scp command, identifies the device and the default username, and specifies the name of the file. The file.txt document will be transferred from the Pi to your computer’s Home directory.

To copy file.txt to your Pi, use:

scp file.txt pi@

(That : at the end is very important!)

Again, the home directory is the destination. To change this, specify a different directory, such as:

scp file.txt pi@

This method is similar to the ADB push command used to send data to and from an Android device How to Use ADB and Fastboot on Android (and Why You Should) Learning to master ADB and Fastboot can make your Android experience a whole lot better. Read More  when flashing a new ROM or rooting.

5. The Best Option: SFTP

If you have a good FTP client that has support for the secure SFTP, then this is perhaps the best option to grab data from your Raspberry Pi. For this, the flexible, open source FileZilla project FileZilla - Why This FTP Client Triumphs Over Its Competitors Portable apps make you independent. Stored on a USB stick or in your Dropbox folder, all your essential tools will be at your fingertips wherever you go. You won't have to install anything either. Read More is a good place to start. You can download a copy from

SFTP stands for SSH File Transfer Protocol, so as long as SSH is enabled on your Raspberry Pi (typically via the raspi-config screen) you can use SFTP for pushing and pulling files in the GUI.

With FileZilla running, open File > Site Manager, and click New Site. From here, enter the IP address of your Raspberry Pi in the Host box (or just raspberrypi.local if you have Bonjour services running).

5 Ways to Copy Data From a Raspberry Pi to a PC muo diy raspberrypi transferdata sftp settings

Continue filling the form, selecting SFTP – SSH File Transfer Protocol for the Protocol and Normal for the Login Type. Enter the current Raspbian username and password for User and Password (by default this is pi and raspberry). You might want to click Rename to give the connection a descriptive name — this is particularly useful if you use FileZilla regularly.

5 Ways to Copy Data From a Raspberry Pi to a PC muo diy raspberrypi transferdata sftp transfer

As long as the Pi is already booted, you can click Connect to begin the connection. In FileZilla, the local device (your PC) is represented on the left, with the remote computer (your Raspberry Pi) on the right. You’ll need to browse through the directories on both sides to find the source and destination files. Once you’ve done this, you can copy files from your Raspberry Pi by dragging them to the left pane, or right-clicking and selecting Download.

(To copy files to the Pi, simply move them from left to right.)

Although a little fiddly to setup, we reckon SFTP is the best solution for transferring files to and from your Raspberry Pi. For small files like MP3s and images, you can also use the boot partition to copy data.

And if you’re interested in using your Raspberry Pi as a desktop PC Using a Raspberry Pi as a Desktop PC: 7 Things I Learned After a Week Can a modest Raspberry Pi replace a desktop PC? I spent seven days writing and editing on the Pi, with interesting results. Read More , check out what we’ve learned from doing that.

Related topics: File Sharing, FTP, Raspberry Pi.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Edwin
    November 16, 2017 at 7:57 pm

    But wht if I keep getting those 'permission denied' messages? I changed to another user/password and connecting to the directory on the Pi is working, but whenever I try to move something there with Filezilla it gives the above message.

  2. ThreeDogs
    August 5, 2017 at 6:22 pm

    Hello nice tips, but I have a rather special request for help.
    I want to download data from my pc to the RPi BUT
    using Bash or - if need be - Python.
    So I can dynamically load data files as and when needed.
    In fact those data files could be scripts, python and pure data.
    I would be most grateful for any tips!

  3. Getgood
    March 9, 2017 at 10:48 pm

    Why don't you makeuseof disqus and get rid of this shit comment section.

  4. Doc
    March 9, 2017 at 6:07 pm

    Can't believe the simplest options (popping the Pi's (micro)SD card into a card reader, or accessing a shared network folder, either on the Pi or on a desktop machine) were not discussed. :p

    • Derp
      March 9, 2017 at 10:41 pm

      Because it's too obvious derp..

    • Derp
      March 9, 2017 at 10:43 pm

      "Dropbox and Box are both available via the browser, but are slow. OneDrive and Google Drive, meanwhile, can barely be used. We’d suggest sticking to whichever you find the most useful."
      Is #2 for reals? Use cloud but it's slow and or "can barely be used". Does Google not have a drive app you can run on the pi instead of using a browser?

      • Christian Cawley
        March 31, 2017 at 6:02 pm

        Sadly no.

    • Christian Cawley
      March 31, 2017 at 6:03 pm

      Well, option 1 requires shutting down your Pi, which is a bit annoying.

      As for 2, it can get messy setting up a network share, especially with older versions of Windows, and we felt it was out of the scope of this article.

      That doesn't mean we won't approach it in a dedicated article, however...