Skip to content

Instantly share code, notes, and snippets.

@skryvets
Forked from garethrees/format.sh
Created August 15, 2025 22:36
Show Gist options
  • Save skryvets/ae1e4225d9b237fa62c673be75d9ff4f to your computer and use it in GitHub Desktop.
Save skryvets/ae1e4225d9b237fa62c673be75d9ff4f to your computer and use it in GitHub Desktop.
Format USB drive from the command line macOS
diskutil list
diskutil unmountDisk /dev/disk2
diskutil eraseDisk FAT32 SANDISK /dev/disk2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment