Skip to content

Instantly share code, notes, and snippets.

@hofmannsven
Last active Jul 25, 2019
Embed
What would you like to do?
Reformat a bootable USB drive on the command line interface.

Reformat a bootable USB drive

1. Identify volume

df -h

Output may look something like this:

Filesystem  Size  Used  Avail  Use%  Mounted on
/dev/sda    1.9G  17M   1.9G   1%    /media/pi/USB

2. Unmount volume

sudo umount /dev/sda

3. Format volume

vFat filesystem:

sudo mkfs.vfat /dev/sda

NTFS filesystem:

sudo mkfs.ntfs /dev/sda

EXT4 filesystem:

sudo mkfs.ext4 /dev/sda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment