Showing posts with label Disk image. Show all posts
Showing posts with label Disk image. Show all posts

Wednesday, May 2, 2018

Emmanuel Akor

How to write a disk image file to an SD card using the command line on a Mac or Linux

How to write a disk image file to an SD card using the command line on a Mac or Linux
Do I need to write a disk image file to the SD card? This will help make the command "dd" for the command line. This handy command works not only on the Mac, but also on computers with Linux, and you do not need to download anything else.
This method is suitable for advanced users who are familiar with the command line. Otherwise, we recommend using a special program, like EtcherIf you have the necessary skills, use the command "dd".

How to write down. img file to SD card via command line

First, start the Terminal program, which is located in the Utilities folder. Then put the file where it will be easy to find.
Issue the following command:
diskutil list
Find the SD card in the diskutil list and write down the rdisk number of this card. Later it will need to be used in the command along with the name of the disk image file.
Then use the following command:
sudo dd if = StartFile.img of = / dev / rdiskOMER bs = 1m
Replace the text "Name of the File" with the name itself, and "rdisk" with the number obtained from the list.
Press return (enter) and enter the administrator password to start recording. This may take some time depending on the file size and the speed of the card.
For example, if the file name looks like "RaspberryPiCustom.img" and the disk number is "/ dev / rdisk4", the command will look like this:
sudo dd if = RaspberryPiCustom.img of = / dev / rdisk4 bs = 1m
Everything is simple enough, so you should not have any difficulties.
Read More