exFAT


Now that Linux 5.7 has been released containing the new Samsung implementation of their exFAT driver, it is time to format all my removable storage media to exFAT.[0]

Why?

Previously, I would always format my external hard drives and memory sticks as NTFS even though I only use Linux. This was because the default FAT32 file system does not support files larger than 4GB (and NTFS does), and also, if I need to share files with people who use Windows or Mac, they can read the NTFS file system. Windows natively, and Linux and Mac via ntfs-3g.[1] This worked OK, but it was annoying having to use a FUSE-based solution that is quite slow.

How?

Start by installing exfatprogs so that you have what you need to format to exFAT.[2]

On Arch Linux, that’s just:

sudo pacman -S exfatprogs

Next, you need to get a list of disks on your system so that you know which one to format. Personally, I like to list them all, then plug in my intended target, then list again. That way, you know for sure which disk is the removable one - even if it was otherwise obvious. I never take any risks when it comes to formatting drives with data on them.

fdisk -l

Now that you know which device to use, run the command below. Set your own label and specify the correct drive.

sudo mkfs.exfat -n LABEL /dev/sdX

Finally, run a check to make sure everything went smoothly.

sudo fsck.exfat /dev/sdXn

Now, I can use my removable storage devices on any OS and with native kernel drivers!

References

[0] https://kernelnewbies.org/Linux_5.7#New_exFAT_file_system
[1] https://www.tuxera.com/company/open-source/
[2] https://github.com/exfatprogs/exfatprogs