← BACK TO SITE
← BLOG
// ADMIN 2026-03-26

RPI Clone

====== RPI Clone ======


rpi-clone is a shell script for cloning a running Raspberry Pi booted source disk (SD card or USB disk) to a destination disk which will be bootable.


Destinations include:

 * SD cards in the SD card slot or a USB card reader

 * USB flash drives

 * USB hard drives and SSDs

 * NVMe drives attached directly to the Pi PCIe bus


===== Quick Start Guide =====

Install rpi-clone:

<code>

curl https://raw.githubusercontent.com/geerlingguy/rpi-clone/master/install | sudo bash

</code>

If booting off an internal microSD card, clone to an external USB drive:

<code>

sudo rpi-clone sda

</code>

If booting off an external USB drive, clone to the internal microSD card:

<code>

sudo rpi-clone mmcblk0

</code>

If booting off an internal microSD card, clone to a PCIe NVMe SSD (note: you may need to change EEPROM settings to boot off NVMe SSDs):

<code>

sudo rpi-clone nvme0n1

</code>

For an exhaustive list of options and usage scenarios, read this [[https://github.com/geerlingguy/rpi-clone|project’s README]].


===== Uninstall =====

Assuming you used the install script with the curl | sudo bash installation method, the following command will remove both files that were downloaded:


<code>

sudo rm -rf /usr/local/sbin/rpi-clone*

</code>

Code and License

The code for rpi-clone is maintained on GitHub:


[[https://github.com/geerlingguy/rpi-clone]].


The code is licensed under the BSD 3-Clause License.


Author

This project was originally authored by [[https://github.com/billw2/rpi-clone|@billw2]], and is now maintained by [[https://www.jeffgeerling.com/|@geerlingguy]], based on many patches by [[https://www.linux-tips-and-tricks.de/en/|@framp]].