Linux Notepad

Format USB Drive to ExFAT on Linux

This guide explains how to partition and format USB storage devices (flash drives, external HDDs/SSDs) to the ExFAT filesystem on Linux systems.
ExFAT provides cross-platform compatibility with Windows, macOS, and Linux.

The OS I chose is Ubuntu 21, but it will work in any Debian derived OS, including Ubuntu, Raspbian OS, Linux Mint and so on.

Prerequisites

The exfat-utils package contains the mkfs.exfat and fsck.exfat utilities, where the first one creates the exFAT filesystem, while the second one checks and repairs the exFAT filesystem.

Install required packages:

sudo apt update
sudo apt install exfat-utils

Formatting Process

1. Identify USB Device

List all storage devices:

sudo fdisk -l

Look for your USB device (usually /dev/sdX where X is a letter).
Warning: Verify the correct device to avoid data loss!

2. Create the New Partition

Access fdisk:

sudo fdisk /dev/sdX

Follow these steps:

  1. Type d to delete existing partitions (if there are any)
  2. Type n for new partition
  3. Select p for primary
  4. Press Enter twice for default first/last sectors
  5. Type w to write changes
  6. Type q to quit

3. Create an exFAT filesystem

sudo mkfs.exfat -n LABEL /dev/sdX1

and replace LABEL with your desired name.

When formatting, you should see:

exfatprogs version : 1.1.0
Creating exFAT filesystem(/dev/sdd1, cluster size=131072)

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
Synchronizing...

exFAT format complete!

4. Check the newly created filesystem (Optional)

Note: The partition must be unmounted before running the check command.

sudo fsck.exfat /dev/sdX1

Additional Notes

  • Always backup important data before formatting
  • The device path (/dev/sdX) varies by system
  • ExFAT supports files larger than 4GB
  • Modern operating systems support ExFAT natively

Resources

Back to homepage