Tuesday | 05 NOV 2024
[ previous ]
[ next ]

Formatting a USB

Title:
Date: 2024-02-03
Tags:  

The best format to use for usbs seem to be exfat.

Make sure the usb is unmounted and make sure that you know which device that you're going to format.

lsblk

This should list the available devices.

The first step is to set the usb's disk label also known as the partition table.

sudo parted /dev/sda -- mklabel msdos

msdos is the most common type.

Mark out the partition:

sudo parted /dev/sda -- mkpart primary 0% 100%

Now we can create the filesystem:

sudo mkfs.exfat /dev/sda

Now the device should be ready to be mounted and used on Linux and Windows.