3

I have several .py and .jpg files on my Raspberry Pi that I'd like to copy to my Mac. Is there anyway to do it directly from the SD card or with a USB stick?

I prefer to not download any additional software.

I've tried similar steps to those indicated here. I've also tried to connect the SD card directly to the computer but I can't seem to find the files on it.

red_kb
  • 93
  • 1
  • 6

2 Answers2

6

You have two easy options here.

You can simply copy the files from the Pi to /boot and then copy them from the SD card.


Another option is to set the Pi to emulate a USB Ethernet stick, which will allow you to copy the files via SSH. Following the instructions at https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a. All of these instructions can be performed from the computer, except for #1.

  1. Enable SSH using raspi-config.
  2. In config.txt, add dtoverlay=dwc2 to the end.
  3. Add modules-load=dwc2,g_ether to the end of cmdline.txt, separating it from previous commands with a space. Reboot the Pi, or shut it down and power it using the next step.
  4. Plug the the Pi into the computer using the USB (not power) port. The Pi will appear as a USB Ethernet device.
  5. Using SCP as described in https://stackoverflow.com/a/3710966, run scp raspberry@your.ip.address:/home/pi/file ~/Documents/file. You can find your Pi's IP address in the Network panel of System Preferences. Also, you should replace raspberry with your username.
lights0123
  • 426
  • 2
  • 7
2

If you have the USB adapter for your pi-zero you can simply connect the usb stick and copy the file to it (it should be mounted to something like /dev/sdb1). just type

mount

to check the mount point AFTER having connected the USB stick. Otherwise, you can connect directly the microsd to a linux computer (MacOS doesn't support ext3, so you will not able to mount the drive unless you install something like https://osxfuse.github.io/)

Steve Robillard
  • 34,988
  • 18
  • 106
  • 110
Giuseppe B
  • 146
  • 1