Skip to content

Instantly share code, notes, and snippets.

@sbmaggarwal
Last active September 22, 2024 03:21
Show Gist options
  • Save sbmaggarwal/40dc46310a875a59a14136bf4c5d6e28 to your computer and use it in GitHub Desktop.
Save sbmaggarwal/40dc46310a875a59a14136bf4c5d6e28 to your computer and use it in GitHub Desktop.
Format a USB drive on MacOS

Format a USB drive on MacOS:

sudo diskutil eraseDisk exFAT sandisk128 /dev/disk9

Add secure erase if needed (4 being most secure AND slowest):

sudo diskutil secureErase 4 eraseDisk exFAT sandisk128 /dev/disk9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment