For instance, users are often unsure as to what file system they should format the USB with. Generally, you should stick to ext4 for the best performance and stability. But if cross-platform compatibility is a concern, you can instead go with exFAT or FAT32. Users have also reported facing issues with the USB not being usable after formatting. We’ve detailed how you can format the USB properly and resolve all such issues in this article.
How to Format USB in Linux
We’ll use ext4 as an example, but you can choose your preferred file system when formatting the USB. Remember to backup any important data beforehand. Also, make sure you specify the correct device to format when performing the command-line methods, as it’s easy to mess this up and format the wrong drive.
Using GParted
GParted is a GUI-based partition manager. Using GParted is generally the easiest way to format USB drives on most distros, so if you’re new to Linux, this should be your go-to option. Here are the necessary steps for this:
GNOME Disks
GNOME Disks is the default partition manager for GNOME desktop environments. It’s pre-installed in most of the popular Linux distros, including Ubuntu. Here are the steps to format your USB using this utility:
Make File System (mkfs)
GParted performs the disk operations through the mkfs utility. So, you can think of this method as using GParted but via the command line, although their origins are actually the other way around. In any case, here are the steps to format your USB using mkfs:
Using dd
You can use dd to either zero-fill or write random data to your USB drive, essentially formatting it and making the data unrecoverable. This is a good idea if you plan to lend the USB or sell it to someone.
Using dd is very simple; the base syntax is as follows:dd if=source of=
Using Shred
Shred is essentially dd but more secure. Its overwriting patterns are optimized to destroy as much residual data as possible, so this is your best bet if you’re trying to wipe the USB completely.
The base syntax for Shred is shred
Problems When Formatting USB
A commonly reported issue regarding USBs is that users installed Linux onto the USB, and now it’s not usable for data transfer. Reverting a bootable USB to a non-bootable state is very simple; all you have to do is format it.
The USB not being mountable after formatting is another common problem. This time, it usually happens because the formatting tools in Linux are capable of removing everything from the drive, including the filesystem signatures. As there are no partitions to mount, you’ll have to create one first.
If sudo mount