How to Format a USB Drive as exFAT on Linux

Last updated: June 22, 2022 | Linuxopsys

ExFAT presents a filesystem, specially designed and optimized for USB flash drives, SD cards, and external drives, which is making it popular for Linux users.

For purpose of formating a USB disk as exFAT on Linux, need to install the exfat-utils or exfatprogs which can allow us to create, read, write, etc. exFAT filesystem to any device whether is a USB device or hard disk partition.

In this guide, we are going to show how to format a USB Drive as exFAT on Linux from terminal and GUI.

The two ways are:

  • Format a USB disk using exfatprogs tool from the terminal.
  • Format a USB Disk as exFAT using Gnome Disks Tool.

If you are using a Linux kernel starting from 5.4.x, then exFAT file system support is enabled in the Linux kernel. If consider formatting a USB drive as exFAT you need to install exfat-utils or exfatprogs. We recommend using exfatprogs tool because of new features and additional support.

1. Format a USB Disk as exFAT using exfatprogs from Terminal

The exfatprogs packages provide a tool used for managing extended file allocation table filesystem, which allows users to create, check and label the exFAT filesystem.

Install exfatprogs with following command:

sudo apt install exfatprogs

Open terminal, and find USB drive with fdisk following command:

sudo fdisk -l 

Or you can also find it with df command:


In my case: /dev/sdb is my usb drive, and i.e /dev/sdb1 presents a partition.

Now, open the fdisk menu with command:

sudo fdisk /dev/sdb
fdisk menu
fdisk menu

To create and add a new partition. Just type n in fdisk menu:


n - command is for creating a new partition.

After you type, It will ask to enter some values, you can just press enter and it will be added as a default.

We can verify partition with p command:


Now that we have a partition, remains to set a flag. To change the flag to exFAT type command t


Fdisk will ask to enter a number that indicates the flag you want to set. List them all to see all flags with command L

fdisk partition list
fdisk partition list

Chose and type number 7 in fdisk for HPFS/NTFS/exfat


Now that flag is set, we need to write and save our settings by typing the command w in fdisk.
w - is for writing a table to disk.



The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Since we now have a partition, we need to create a filesystem with mkfs command, mkfs stands for creating an exFAT filesystem..

Important: Note that you should find your partition number identifier, and replace /dev/sdb1.

sudo mkfs.exfat /dev/sdb1


mkexfatfs 1.3.0
Creating… done.
Flushing… done.
File system created successfully.

After creating a filesystem you can verify it to make sure that everything is formatted correctly:

sudo fsck.exfat /dev/sdb1


exfatfsck 1.3.0
Checking file system on /dev/sdb1.
File system version           1.0
Sector size                 512 bytes
Cluster size                128 KB
Volume size                 119 GB
Used space                 4352 KB
Available space             119 GB
Totally 0 directories and 0 files.
File system checking finished. No errors found.

If you have done this, then your USB device is ready to use!

2. Format a USB Disk as exFAT using Gnome Disks tool

If you using Gnome, then you probably have Disks tool pre-installed in system.

Open Disks and find a USB drive on the left side. Make sure that you selected a USB device, and that you selected the desired partition that wants to format as exFAT.

Disks tool
Disks tool

Select the settings button:

Disks selected settings
Disks selected settings

Select Format Partition under the settings button and a new window will appear.

Format Volume Settings
Format Volume Settings

Chose Other to find in new window exFAT format type. Optional you can add a Volume name i.e: "exFAT volume format".

Select exFAT under radio button options
Select exFAT under radio button options

At the end will be asked to confirm the settings that we selected:

Disks Confirmation Details
Disks Confirmation Details

Click on red button Format, and you are done!


In this guide, we have learned how to format a USB drive as exFAT on Linux from terminal and GUI. Using GUI to format exfat is easier but if you are a terminal lover ofcource use it.



Please add comments below to provide the author your ideas, appreciation and feedback.

Leave a Reply

Leave a Comment