mkfs.exfat: command not found

exFAT is the newest Microsoft 64-bit filesystem, a nice upgrade from FAT32. exFAT is a fast, lightweight filesystem for USB sticks and SD media, and supports much larger file and volume sizes than FAT32. Wikipedia cites a 16 EiB maximum file size and 128 PiB maximum volume size. It does not have a journal or CoW.

exFAT is troublesome for Linux users because it is a patented proprietary filesystem, which was not available to Linux as a native filesystem until 2020. You need to worry about Linux compatibility only if you want to read and copy USB flash drives or SDXC cards formatted with exFAT to your Linux computer. For example, you want to use exFAT-formatted SDXC cards with your digital camera, or audio recording device.

To use exFAT with Linux you have two options. One is to use the exfatprogs, or exfat-fuse and exfat-utils packages, which are available on most distributions. exFAT FUSE was developed and is maintained outside of the US, making it immune to US patent laws. exFAT FUSE takes advantage of Filesystem in Userspace (FUSE), which enables unprivileged users to run filesystems in userspace. It is not as efficient as a filesystem properly integrated into the kernel, but it works, and you can read and write exFAT files. Some hardy souls try to use exFAT FUSE in shared partitions to share files with Windows and macOS. In theory this should work, though there are sometimes glitches related to how well a particular Windows or macOS release implements exFAT.

In case you encounter the below error:

mkfs.exfat: command not found

You may try installing below package according to your choice of distribution.

Distribution Command
Debian apt-get install exfat-utils
Ubuntu apt-get install exfat-utils
Alpine apk add exfat-utils
Arch Linux pacman -S exfat-utils
Kali Linux apt-get install exfat-utils
Raspbian apt-get install exfat-utils
Docker docker run cmd.cat/mkfs.exfat mkfs.exfat

mkfs.exfat Command Examples

1. Create an exfat filesystem inside partition 1 on device b (sdb1):

# mkfs.exfat /dev/sdb1

2. Create filesystem with a volume-name:

# mkfs.exfat -n volume_name /dev/sdb1

3. Create filesystem with a volume-id:

# mkfs.exfat -i volume_id /dev/sdb1
Related Post