How to Transfer Files to the Raspberry Pi

Find the best method for your project.
Ash Ash (362)
5 minutes

Some Pi operating systems come with specific instructions for transferring files—like RetroPie. However, I'll assume your Pi is running Raspberry Pi OS (formerly Raspbian). It's the most common operating system for the Raspberry Pi. Make sure your Pi is up to date by visiting our guide on how to update your Pi to the latest version of Raspberry Pi OS.

You will need a network connection. Be sure to connect an ethernet cable or log into your WiFi network.

Raspberry Pi 3 B+Raspberry Pi 3 B+ ×1

Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.

Transfer files to the Raspberry Pi using SCP

The fastest way to copy files to your Raspberry Pi is with SCP, which stands for “secure copy”. This method might be difficult at first for newer users, but it eliminates the overhead of a GUI application and is both fast and secure.

Enable SSH

Because SCP is based on the SSH protocol, you'll need to enable SSH on your Pi before you can use this method.

Find your Pi's IP

Next you'll need to find the IP Address of your Raspberry Pi.

Copy files with the SCP command

The SCP command is constructed as follows:

scp [source files] [user]@[host]:[path]

Note: The path can be relative or absolute. If relative, the path is relative to the user's home directory.

Here's an example:

scp file1.txt file2.txt pi@

This command will ask you for the password for the pi user, which by default is raspberry.

In this example file1.txt and file2.txt are transferred to folder1 in your home directory: /home/pi/folder1. You can also specify an absolute path, like this:

scp file1.txt file2.txt pi@

This will move the files to /code in the root directory of your Pi, assuming you have the correct permissions to access this directory.

Raspberry Pi SFTP file transfer

SFTP is even easier to use than SCP. Once you establish an SFTP connection with your Pi, you can drag and drop files with the click of a button.

To log into the Raspberry Pi via SFTP, first grab the IP Address of your Raspberry Pi. Then open your SFTP client (see below), and use your IP address with the default credentials:

username: pi
password: raspberry

SFTP client for Windows 10

Windows users can use WinSCP for SFTP file transfers. This program is recommended by the Raspberry Pi Foundation.

SFTP client for macOS

Cyberduck is one of the best SFTP options for Mac users.

Transfer files to Raspberry Pi over network share

Samba makes it easy to access the Pi via shared network devices. This can be easier to manage than logging into the Pi for every file transfer.

Raspberry Pi OS does not come with Samba by default. However, it's very easy to set up. The Rasberry Pi Foundation provides detailed instructions on how to install and set up Samba.

With network sharing enabled, you can access the Raspberry Pi by clicking on it from your list of available network devices. This makes it easy to move files over in a pinch.

John John (304)
15 minutes

Important: Raspbian has been replaced by Raspberry Pi OS! Raspbian is a free Debian-based operating system optimized for Raspberry Pi hardware. "Buster" is development code name for Debian 10.