Bootable Linux USB on a Mac

I wanted to create a bootable USB drive on my macOS machine in order to install Arch Linux on a PC.

First, execute the following command to find out the name of the USB device:

$ diskutil list
...
/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 GB     disk3
   1:                 DOS_FAT_16 ⁨LIBUSB⁩                  1.0 GB     disk3s1

Therefore, for me the name of the USB device is /dev/disk3. You now need to unmount that USB drive using the followng command:

$ diskutil unmountDisk /dev/disk3
Unmount of all volumes on disk3 was successful

The filename of the Arch Linux image file is archlinux-2020.11.01-x86_64.iso – yours may vary. You now need to use dd(1) to write that image file to the USB stick:

$ sudo dd if=/Users/mtsouk/Desktop/archlinux-2020.11.01-x86_64.iso of=/dev/rdisk3 bs=1m
load: 1.46  cmd: dd 93910 uninterruptible 0.00u 0.01s
56+0 records in
55+0 records out
57671680 bytes transferred in 4.266207 secs (13518256 bytes/sec)
load: 1.58  cmd: dd 93910 uninterruptible 0.00u 0.07s
282+0 records in
281+0 records out
294649856 bytes transferred in 21.556241 secs (13668889 bytes/sec)
731+1 records in
731+1 records out
766849024 bytes transferred in 56.085314 secs (13672902 bytes/sec)

The r before disk is for RAW mode – you are not just copying archlinux-2020.11.01-x86_64.iso, you are writing it in RAW mode, which among other things will create a bootable USB drive for you. Pressing Control+t while the command is running will show the progress of the process.

If you execute diskutil list now, you will get the following information about the USB device:

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 GB     disk3
   1:           Linux Filesystem ⁨⁩                        703.6 MB   disk3s1
   2:                        EFI ⁨ARCHISO_EFI⁩             62.9 MB    disk3s2
   3:       Microsoft Basic Data ⁨⁩                        307.2 KB   disk3s3

I found this document extremely helpful!