I have a UBS drive formatted as fat32 because I need to share it with Linux and macOS. When I want to copy a Linux ISO file which is larger than 4GiB, this was not possible due to the limitation of fat32 filesystem.

A solution is to format that USB drive with exfat filesystem. I will do this on a Fedora 35 machine, but the process should be familiar for other Linux distros too.

# udisksctl status | grep -i usb
TOSHIBA TOSHIBA USB DRV   PMAP      07086B299E1C4C22     sde

# lsblk /dev/sde
sde      8:64   1  7.5G  0 disk
└─sde1   8:65   1  7.5G  0 part

# mkfs.exfat /dev/sde1
exfatprogs version : 1.1.3
Creating exFAT filesystem(/dev/sde1, cluster size=32768)

Writing volume boot record: done
Writing backup volume boot record: done
Fat table creation: done
Allocation bitmap creation: done
Upcase table creation: done
Writing root directory entry: done

exFAT format complete!

A quick explanation of what happened above. My USB drive is detected as sde, and it already has a partition named sde1. The command used to create an exfat filesystem is mkfs.exfat DEVICE_PARTITION.

Pretty easy, isn’t it? If you’re wondering why I even bother write this post, good question. I just want to brain-dump, ‘cus just now I totally forgot how to do that. I guess I can be excused since I pretty much work with ext4, xfs, btrfs and zfs mostly nowadays.