Skip to content

Instantly share code, notes, and snippets.

@brackendawson
Created April 26, 2025 18:01
Show Gist options
  • Save brackendawson/41fd5579f2c48913b6b2e8b86501a6c5 to your computer and use it in GitHub Desktop.
Save brackendawson/41fd5579f2c48913b6b2e8b86501a6c5 to your computer and use it in GitHub Desktop.
How to actually format a USB stick on Linux

How to actually format a USB stick on Linux

Every guide on the internet is wrong except this one. This is for drives up to 2TB.

  1. Make the partition table
fdisk /dev/sdx
o   create a new empty MBR (DOS) partition table
n   add a new partition
# accept all defaults
# remove signature if prompted
t   change a partition type
0b  for 'W95 FAT32'
w   write table to disk and exit
  1. Make the partition
mkfs.vfat -F 32 -n UPPERELEVEN /dev/sdx1 # name in uppercase and <= 11 characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment