How to prepare a bootable USB stick with Ubuntu on macOS using CLI
Recently I wanted to install fresh Ubuntu LTS on my other laptop. Official documentation has a tutorial how to prepare a bootable USB stick on macOS, however in the second step it requires installation of another application.
Here’s how to do it without installing Etcher, using only standard tools.
- Format USB drive with the standard application
Disk Utility
.
2. Find out the name of your disk (USB drive)
3. You need to unmount this disk (but do not eject!). In my case the name of the disk is disk2
, be careful here
4. Navigate to the directory where you have your ISO image. Now write this to the USB stick. Be extra careful here and check the name of the disk that corresponds to your USB stick.
If you get “Operation not permitted” the likely cause is lack of permissions for the Terminal application you use (e.g., iTerm2). To fix this:
- Go to
System Preferences
- Select
Security & Privacy
- Go to
Privacy
tab - Find
Full Disk Access
- Click on the lock and enter your password to make changes
- Click the
+
button to add you Terminal application here
That’s it. Of course, dd
can be used for any other image, not just Ubuntu.