DEV Community

Motouom Victor
Motouom Victor

Posted on

Burn ISO to USB on Mac all versions - ALWAYS WORKS

On Mac, it is not possible to download and install power iso and burn images so to do this easily, we can do it on the terminal which is faster, easier, and convenient.
Below are the steps that you need to follow to accomplish this.

1. Before plugging in the drive, you need to see the available ones on the device first. To do that, run the command

 diskutil list
Enter fullscreen mode Exit fullscreen mode

you should have an output that resembles this

❯ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume APPLE SSD SM0512G Me... 170.9 GB   disk1s1
   2:                APFS Volume Preboot                 447.3 MB   disk1s2
   3:                APFS Volume Recovery                1.1 GB     disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4
   5:                APFS Volume APPLE SSD SM0512G Media 15.4 GB    disk1s5
   6:              APFS Snapshot com.apple.os.update-... 15.4 GB    disk1s5s1

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +6.1 GB     disk3
   1:       Microsoft Basic Data                         6.1 GB     disk3s1
   2:                        EFI ESP                     5.2 MB     disk3s2
   3:       Microsoft Basic Data                         307.2 KB   disk3s3
Enter fullscreen mode Exit fullscreen mode

2. Insert the drive and run the command again.

❯ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume APPLE SSD SM0512G Me... 170.9 GB   disk1s1
   2:                APFS Volume Preboot                 447.3 MB   disk1s2
   3:                APFS Volume Recovery                1.1 GB     disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4
   5:                APFS Volume APPLE SSD SM0512G Media 15.4 GB    disk1s5
   6:              APFS Snapshot com.apple.os.update-... 15.4 GB    disk1s5s1

_**/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *61.9 GB    disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:       Microsoft Basic Data Untitled                61.7 GB    disk2s2**_

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +6.1 GB     disk3
   1:       Microsoft Basic Data                         6.1 GB     disk3s1
   2:                        EFI ESP                     5.2 MB     disk3s2
   3:       Microsoft Basic Data                         307.2 KB   disk3s3
Enter fullscreen mode Exit fullscreen mode

You will notice that there is an additional disk on the list of disk. Take note of the drive since you will use it in the process. For me, the drive is /dev/disk2

3. unmount the disk to begin the process. For this, you have various commands and can try any of them if the others give you an error like

zsh: command not found: unmount
zsh: command not found: unmountDisk
or a similar error
Enter fullscreen mode Exit fullscreen mode

a.

unmount /dev/disk2
Enter fullscreen mode Exit fullscreen mode

b.

unmountDisk /dev/disk2
Enter fullscreen mode Exit fullscreen mode

c.

 diskutil unmountDisk /dev/disk2
Enter fullscreen mode Exit fullscreen mode

4. After unmounting the drive, you now burn the iso file into the drive using the command

sudo dd bs=1m if=~/Users/gis/Downloads/ubuntu-24.04-desktop-amd64.iso of=/dev/rdisk2
Enter fullscreen mode Exit fullscreen mode

NB: ~/Users/gis/Downloads/ubuntu-24.04-desktop-amd64.iso is the path to the image you wish to burn and /dev/rdisk2 is the drive in which you are burning it into

after running the above command, you wait for about 5 - 10 minutes then you will see a message like

5831+1 records in
5831+1 records out
6114656256 bytes transferred in 579.370318 secs (10553969 bytes/sec)
Enter fullscreen mode Exit fullscreen mode

5. After completion, run the command

diskutil eject /dev/disk2
Enter fullscreen mode Exit fullscreen mode

This will eject the drive from your machine. remove the drive and then insert it again.

And there we go, you now have a flash drive burnt in a mac device.

Top comments (0)