Download File From Raspbian To Mac On Terminal

Copying operating system (typically Raspbian) image files to a micro SD card is an essential part of getting started with a Raspberry Pi. It can be a long-winded process, and is often difficult for newcomers to grasp.

Mac and Linux users typically use the dd command in the terminal, while Windows users require a program such as Win32DiskImager.

So we were pleased to come across Etcher. Etcher turns the whole process of flashing an OS image file into three simple steps: Select Image, Select Drive, and Flash Image.

Setting up a Raspberry Pi from a Mac. As part of the same hardware project I wrote about yesterday, we’re looking into using a Raspberry Pi as an MQTT broker with a couple of ESP32 clients. It turns out this is the first time I’ve ever actually had to set up a Raspberry Pi from scratch, and despite what I’d been led to believe, it’s annoyingly fiddly, especially if you want to connect.

From

More importantly, the same program, with the same interface, is available on all three types of computer – Windows, Mac, and Linux – which makes it easy for everybody to understand.

Etcher takes a lot of the stress out of flashing a drive. Etcher won’t write to your hard drive volumes unless you check Unsafe Mode in Settings. Unsafe Mode is handy if you want to flash a USB thumb drive or other internal drive, but it’s disabled by default, making the process safer for newcomers.

We like Etcher so much, we thought we’d create this guide to installing and using it. Follow these steps for hassle-free SD card flashing.

STEP-01 Install in Windows or Mac

Download and install Etcher from the website. Double-click the .exe file in Windows and follow the Etcher setup wizard. Drag the Etcher app to your Applications folder on a Mac and double-click to open it. In Windows, run Etcher in Administrator Mode: right-click on Etcher and choose ‘Run as administrator’.

STEP-02 Install on Linux

Download the AppImage file from the Etcher website. Open a terminal window and enter:

STEP-03 Download your OS image

Download a copy of the latest Raspbian image from the Downloads page (or the OS image you want to install). Unzip the file after it has downloaded. Double-click the file in Mac or Linux (or use unzip in a terminal window). In Windows, right-click the file and choose Extract All. Etcher can install directly from a ZIP file, but the process takes a lot longer.

STEP-04 Select the image

Click Select Image in Etcher. Use the file manager window and locate the image you unzipped in the previous step. Click Open. The image will appear under Select Image, and Connect a drive will highlight red.

STEP-05 Insert your SD card

Attach your SD card to the computer. Etcher will select it automatically. Etcher won’t write to your hard drives by default, but check that the SD card is listed correctly. Now click Flash! to write the image file to the SD card.

STEP-06 Writing the image

Etcher will format the SD card, before writing and verifying the image; this is shown by a progress bar. When done, remove the SD card, insert it into your Raspberry Pi, and power it up. If you want to flash another SD card with the same image, insert it and click Use Same Image.

Subscribe and never miss an issue

Get a a brand new Raspberry Pi Zero W, a case for it, and a selection of adapter cables with a twelve-month print subscription to The MagPi!

Terminal User Guide

In Terminal, you can move and copy files locally or remotely using the mv, cp, and scp command-line tools.

Tip: It’s easier to move and copy files using the Finder. See Organize files in folders.

Move a file or folder locally

  • In the Terminal app on your Mac, use the mv command to move files or folders from one location to another on the same computer. The mv command moves the file or folder from its old location and puts it in the new location.

    For example, to move a file from your Downloads folder to a Work folder in your Documents folder:

    % mv ~/Downloads/MyFile.txt ~/Documents/Work/MyFile.txt

    You can also change the name of the file as it’s moved:

    % mv ~/Downloads/MyFile.txt ~/Documents/Work/NewFileName.txt

See the mv command man page.

Copy a file or folder locally

Download File From Raspbian To Mac On Terminal Mac

  • In the Terminal app on your Mac, use the cp command to make a copy of a file.

    For example, to copy a folder named Expenses in your Documents folder to another volume named Data:

    % cp -R ~/Documents/Expenses /Volumes/Data/Expenses

    The -R flag causes cp to copy the folder and its contents. Note that the folder name does not end with a slash, which would change how cp copies the folder.

Download File From Raspbian To Mac On Terminal File

See the cp command man page.

Download File From Raspbian To Mac On Terminals

Copy a file or folder remotely

  • In the Terminal app on your Mac, use the scp command to copy a file or folder to or from a remote computer.

    scp uses the same underlying protocols as ssh.

    For example, to copy a compressed file from your home folder to another user’s home folder on a remote server:

    % scp -E ~/ImportantPapers.tgz username@remoteserver.com:/Users/username/Desktop/ImportantPapers.tgz

    You’re prompted for the user’s password.

    The -E flag preserves extended attributes, resource forks, and ACL information.

    The -r flag, which isn’t used in this example, causes scp to copy a folder and its contents.

See the scp command man page.

Download File From Raspbian To Mac On Terminal Linux

See alsoOpen or quit Terminal on MacOpen new Terminal windows and tabs on MacExecute commands and run tools in Terminal on Mac