Mac下为树莓派(Raspbian)安装镜像

以下操作适用于Mac和Linux下。

下载镜像

下载镜像,此处默认为最新桌面版,其他版本可访问Download Raspbian for Raspberry Pi

curl -o raspbian-stretch.zip https://downloads.raspberrypi.org/raspbian_latest

解压

unzip raspbian-stretch.zip

请注意,此时解压出的文件名会类似2017-11-29-raspbian-stretch.img 根据不同的版本会有不同的文件名,请注意在下面的刷入动作中更改。

查看内存卡

df -h

反挂载内存卡

 sudo diskutil unmount /dev/diskXs1

将镜像刷入内存卡

sudo dd bs=1m if=./2017-11-29-raspbian-stretch.img of=/dev/rdiskX

弹出内存卡

sudo diskutil eject /dev/rdiskX

测试

插入树莓派中试一下。

链接

How to install Raspbian to SD card on Mac

猜你喜欢

转载自my.oschina.net/dingdayu/blog/1610239