Whether you're setting up a Linux distro, a bootable utility, or another OS, creating a bootable USB on macOS can be done quickly and efficiently using the Terminal. In this guide, we’ll walk you through the entire process step-by-step—no third-party tools required.
WARNING: This process will completely erase the contents of your USB drive. Make sure to back up any important files before continuing.
Insert your USB drive into your Mac. Then, open the Terminal application. You can find it in:
Applications > Utilities > Terminal
In Terminal, run the following command to list all available disks:
sudo diskutil list
You will be prompted to enter your administrator password.
Look through the list and identify the correct disk that represents your USB drive you wish to turn into a bootable USB. It will likely be something like /dev/disk4 or similar, depending on your setup. If you struggle to locate it you can compare the output of above command with the USB removed vs with the USB inserted.
Example output:
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *16.0 GB disk4
1: Windows_FAT_32 KINGSTON 16.0 GB disk4s1
In this case, the USB is /dev/disk4.
Now, we’ll erase and format the USB drive to FAT32, which is broadly compatible with most bootable systems. Run the following command, replacing /dev/disk4 with the correct disk identifier for your USB:
sudo diskutil eraseDisk FAT32 KINGSTON /dev/disk4
This will reformat the USB with a FAT32 filesystem and label it "KINGSTON". You can change "KINGSTON" to whatever you like, for the purpose of creating a bootable USB it does not matter.
Before writing the ISO image, we need to unmount the USB disk:
sudo unmountDisk /dev/disk4
This prepares the disk for raw byte writing with the dd command.
Now, let’s write the contents of your ISO file to the USB and make it a bootable USB using the dd
command.
Make sure your ISO file is in the current working directory or adjust the path accordingly.
sudo dd if=./name_of_iso.iso of=/dev/disk4 bs=1m status=progress
NOTE: This command may take several minutes depending on the ISO size and USB write speed. It will appear as if nothing is happening—do not interrupt it.
Once the command completes, safely eject the USB drive:
sudo diskutil eject /dev/disk4
You now have a bootable USB created from your ISO file.
IMPORTANT NOTE: When the command / process completes sometimes you will get an error to which you should respond "Eject". This is caused by MacOS not understanding the filesystem. Do not worry your bootable USB should still work.
Using Terminal on macOS to create bootable USB drives is a powerful and fast method, especially for developers and tech enthusiasts. While it requires attention to detail, it gives you full control over the bootable media creation process without relying on third-party software. Happy booting!
If you like this article and want to view our other ones please visit our Knowledge Base main page.