To format a USB drive in Linux, you can use the graphical Disks utility or the Terminal. In Ubuntu's GNOME desktop, open Disks, select the correct USB device and its partition, choose Format Partition, select a file system, and confirm. In the Terminal, identify the USB with lsblk, unmount the correct partition, and use the appropriate mkfs tool.

Before you begin: Formatting removes the drive's existing file-system contents. Copy any files you need to another device first. If the USB suddenly became unreadable and you need its data, do not format it yet; formatting may make recovery harder. If the drive is physically failing or disconnects repeatedly, stop rather than trying more write operations.

usb drive laptop
In This Article
    1. Check the Right Drive and Back Up Your Files
    2. Choose FAT32, exFAT, EXT4, or NTFS
    1. Identify the USB Device with lsblk
    2. Unmount and Format the Correct Partition

Part 1. Before You Format a USB Drive in Linux

Whether you use Ubuntu, Fedora, Debian, or another Linux distribution, two decisions come first: identify the storage device with confidence and choose the file system that fits how you will use it. Getting either wrong can erase important files or leave a USB drive incompatible with your other devices.

Check the Right Drive and Back Up Your Files

If the USB opens normally, copy your documents, photos, and other important files to your computer or another healthy drive. Open some of the copied files to confirm they work before proceeding. If you cannot access the files, consider protecting or recovering the data before formatting.

Now compare the USB's capacity and model against the storage devices shown in Disks or by lsblk. A removable USB might be named /dev/sdb on one computer and /dev/sdc on another. Those names can change when devices are reconnected. A partition such as /dev/sdb1 is different from its parent disk /dev/sdb.

  • Safe to continue: You have a verified backup, the USB is detected consistently, and you can identify its exact disk and target partition.
  • Stop and check: You see several similar-sized drives, you are unsure whether the target is a system disk, or the USB contains files you have not backed up.
  • Do not format for recovery: The USB is unexpectedly RAW, asks to be formatted before opening, repeatedly disconnects, or contains lost files that still matter.

Choose FAT32, exFAT, EXT4, or NTFS

Your preferred file system depends on the size of individual files and the computers or devices that need to read the USB. A 64GB USB is not the same thing as a 64GB file: FAT32, for example, cannot hold a single file of 4GB or more.

File System Best Fit Important Limitation
FAT32 Older devices, media players, and equipment that explicitly requires FAT32 Maximum individual file size is just under 4GB
exFAT Moving large files among Linux, Windows, and modern macOS computers Not every older device or embedded system supports it; Linux may need exFAT tools installed
EXT4 A USB used primarily with Linux computers Windows and macOS do not normally access EXT4 without additional software
NTFS Workflows centered on Windows and large files Read/write support and formatting tools can differ across Linux distributions and other devices

For a general-purpose USB shared by modern Linux, Windows, and Mac systems, exFAT is often a practical starting choice. Choose FAT32 when the target device specifically needs it, or EXT4 for a Linux-only workflow. For a dedicated FAT32 guide, see how to format a USB drive to FAT32 on Linux.

Part 2. Format a USB Drive with GNOME Disks

For Ubuntu and other distributions that include GNOME Disks, this is usually the clearest method because you can see the disk's size and partitions before choosing a destructive operation. Menu labels and button positions can vary slightly across GNOME versions; the steps below follow the official GNOME formatting procedure.

Step 1. Open Disks. Connect the USB and open Disks from the Activities or application search. If the utility is missing, check your distribution's package manager rather than downloading a random disk tool.

format-usb-linux-5

Step 2. Select the USB device, not your system disk. Use the list on the left to find the USB by size and model. Check the partition shown in the Volumes area. If the selected device contains the operating system or folders you still need, stop.

format-usb-linux-6

Step 3. Choose Format Partition. With the correct partition selected, open the partition's menu under Volumes and choose Format Partition (the menu may appear as a gear or three-dot control). This is different from a whole-disk Format Disk operation, which can change the disk's partition layout.

Step 4. Select a file system and confirm. Choose the supported type you need, add a label if offered, and review the device details in the confirmation dialog. Click Format only after confirming the USB is the correct device and all valuable data has been copied elsewhere.

format-usb-linux-7

Step 5. Check the result. Once the operation finishes, open the USB in Files and confirm it appears with the intended capacity and file system. If Disks reports an error, do not repeatedly attempt formatting before identifying the cause.

Note: The images above are original article screenshots from an earlier Linux desktop version. Controls can look different on your system; use the current GNOME menu names and confirm the selected disk rather than following an old icon position blindly.

Part 3. Format a USB Drive Using the Linux Terminal

The Terminal approach is useful when you prefer command-line tools or your desktop does not include GNOME Disks. It is also easier to target the wrong storage device accidentally, so identify the disk first and format only the partition you intend to erase.

Identify the USB Device with lsblk

Step 1. Open Terminal. On many GNOME-based desktops, Ctrl + Alt + T opens a Terminal window. You can also search for Terminal in the application menu. This shortcut is not universal across all desktop environments.

format usb linux via linux

Step 2. Inspect available block devices. Run the following read-only command:

lsblk -o NAME,SIZE,MODEL,TRAN,FSTYPE,MOUNTPOINTS

Compare the output with the USB's printed capacity or model. For example, a USB disk might appear as sdb with one partition sdb1. An NVMe system drive may appear as nvme0n1; never assume the target's name from an example. If you are uncertain, disconnect the USB, run lsblk, reconnect it, and compare the results before making changes.

Refer to the official lsblk manual for the purpose of each column. The older df command lists mounted file systems but is not sufficient by itself to identify every removable disk or unmounted partition.

Unmount and Format the Correct Partition

Step 3. Unmount the target partition if it is mounted. Close any file manager windows or apps using the USB. After confirming the exact partition, run the command below with its real partition name:

sudo umount /dev/sdX1

Important: /dev/sdX1 is a placeholder, not a device you should copy blindly. Replace it only after identifying your USB with lsblk. If umount reports that the target is busy, close applications using the volume and try again. Do not force the unmount of an unknown or active system partition.

unmount the disk to format usb linux

Step 4. Create the required file system on the confirmed USB partition. Select one of these examples. Each command erases the existing file system on its target partition; never run all three. Replace /dev/sdX1 with the verified USB partition and check the command again before pressing Enter.

Desired File System Example Command for a Verified USB Partition
FAT32 sudo mkfs.vfat -F 32 -n USBFILES /dev/sdX1
exFAT sudo mkfs.exfat -n USBFILES /dev/sdX1
EXT4 sudo mkfs.ext4 -L USBFILES /dev/sdX1

These commands use the dosfstools, exfatprogs, and e2fsprogs tools, respectively. If a mkfs utility is missing, install the corresponding package through your distribution's trusted repositories. The Ubuntu exFAT manual documents the exFAT command; FAT and EXT4 options are described in the respective FAT manual and EXT4 manual.

Step 5. Verify that the file system changed. When formatting completes, run:

lsblk -f

Look for the chosen file-system type on the same verified USB partition. If your USB has no partition at all, do not substitute the entire disk name into the examples without understanding its layout. You may need to create a partition first, which is a separate destructive operation; use a graphical disk manager or seek help instead of guessing.

Free Download
Free Download

Part 4. Fix Common Linux USB Formatting Problems

If the formatting operation fails, the error message is more useful than trying the same command repeatedly. Choose the next action based on what Linux can actually detect.

What You See Likely Meaning Safer Next Step
target is busy when unmounting A process is still using the partition Close open files and file-manager windows, check the mount point, and retry a normal unmount; do not use a forced unmount as a shortcut
read-only or write-protected device A hardware switch, permissions state, or a failing controller may prevent writes Check for a physical lock and confirm the correct device. If the problem appeared suddenly, preserve data and investigate before changing disk attributes
wrong fs type or the USB asks to be formatted The existing file system may be unsupported or damaged If files matter, stop and consider recovery first. A new format is not a data-preserving repair
USB is absent from lsblk or repeatedly disconnects Connection, port, cable, or physical USB failure Try another known-good port or computer without writing to the USB. Stop DIY formatting if detection remains unstable
Bootable USB now shows an unexpected small partition A boot-image layout may have replaced the original partition scheme Back up or recover valuable data first. Repartitioning can restore a normal layout but erases existing partitions

Note: A format operation creates a new file system; it cannot repair a failed USB controller or guarantee access to data lost before formatting. If you need the files, deal with recovery before trying repair, partition changes, or another format. For workflows on other operating systems, see the separate USB formatting and unformatting guide. If your goal is to securely wipe an entire disk rather than prepare a reusable USB, treat that as a separate, higher-risk task; the Linux disk-wiping guide addresses that different intent.

Part 5. Verify the Format and Safely Eject the USB

A successful completion message is useful, but a quick real-world check is better. Make sure the new file system is readable and writable before relying on the drive for important transfers.

  1. Run lsblk -f or check Disks to confirm that the expected USB partition shows FAT32, exFAT, or EXT4.
  2. Open the newly formatted volume in Files. Copy a small non-sensitive test file onto it and open the copied file to confirm it is readable.
  3. If you need to transfer a file larger than 4GB, test with exFAT or another compatible file system. FAT32 will reject a single file larger than its file-size limit even when the drive has free space.
  4. Use Eject in Files or Disks and wait until activity stops before removing the USB. This helps prevent interrupted writes and file-system damage.

The GNOME safe removal guidance explains how to eject a drive and what to do if it is still in use. For an additional copy of important files, use another disk or cloud backup; a USB drive should not be the only copy.

Part 6. Recover Files After Formatting the Wrong USB

If you formatted the wrong USB or selected the wrong partition, stop using it immediately. Do not copy new files, create another file system, run repair commands, or repeat the formatting process. Those actions can overwrite data that might otherwise be recoverable. Check for existing backups first.

If the USB remains readable as a storage device, Wondershare Recoverit USB Recovery provides a Windows/macOS workflow for scanning a detectable flash drive, previewing supported recovered files, and saving results to a separate healthy destination.

Recoverit is not a native Linux formatting utility, and recovery is not guaranteed after formatting, overwritten sectors, or physical failure. The separate Recoverit Linux Recovery workflow uses a connection to a reachable Linux machine and should not be confused with scanning an attached USB from Windows or Mac.

Step 1. Leave the original USB untouched. Connect the USB to a compatible Windows or Mac computer with Recoverit installed on its own disk. Confirm that the USB is detected. If it repeatedly disconnects or shows a physical failure, stop instead of running repeated scans.

Step 2. Select the original USB in Recoverit. Open the SD Card Recovery or supported external-device workflow shown in your installed version, choose the affected USB, and start a scan. The current Recoverit V15 Guide describes the USB recognition and scan process.

recoverit interface

Step 3. Let the scan finish before choosing files. Use the available file categories, search, and preview to check which files can be found. A scan result is not proof that every file is complete or usable.

operations during scanning

Step 4. Recover to a different drive. Select the files you need and save them to the computer's internal disk or another healthy storage device, never to the original USB. Open several recovered files to verify that they work before doing anything else with the formatted USB.

preview recovered photos

The original article's related video shows how to look for missing files on a USB drive. It is a general recovery walkthrough, not a demonstration that any particular Linux formatting operation can be reversed.

video

Recent Videos from Recoverit

View More >

If the drive is detected and you want to check recoverable files before deciding how to proceed, you can use the official Recoverit download links below. These are for Windows and macOS; they do not install a Linux desktop edition.

Free Download
Free Download

Conclusion

Formatting a USB in Linux is straightforward once you have protected your files and selected the correct partition. Choose GNOME Disks for a visual, confirmation-led method, or use lsblk and a suitable mkfs utility when working in Terminal. For most modern cross-platform file transfers, exFAT is a practical option; FAT32 is useful for older-device compatibility, and EXT4 fits Linux-only use.

If your USB has become unreadable or you formatted the wrong device, do not treat another format as a recovery step. Stop writes, assess the device state, and save any recoverable data to separate storage before considering further changes.

FAQ

  • How do I format a USB drive to exFAT in Linux?
    Back up the USB, identify its partition with lsblk, unmount that partition if mounted, and then use the available mkfs.exfat utility on the confirmed partition. You may need the exfatprogs package. GNOME Disks may also offer exFAT depending on the distribution and installed tools.
  • Should I use FAT32 or exFAT for a Linux USB drive?
    Use FAT32 if an older device specifically requires it. Choose exFAT for modern cross-platform storage when you need individual files larger than 4GB. For a USB used only with Linux, EXT4 may be more appropriate.
  • Why does Linux say the USB is busy when I try to format it?
    One or more processes may still be using the mounted partition. Close its open files and file-manager windows, unmount the correct partition normally, and retry only when you have verified the device. Do not force-unmount a system partition.
  • Is Format Disk the same as Format Partition in GNOME Disks?
    No. Format Partition recreates a file system on the selected partition. Format Disk can change the entire disk's partition-table layout, affecting other partitions. Verify the action and target device before confirming either one.
  • Can I recover files after formatting a USB drive in Linux?
    Sometimes, if the device is still readable and the original data has not been overwritten. Stop writing to the USB, check backups, and assess whether a supported recovery workflow can find and preview usable files. Recovery is not guaranteed, especially after additional writes or hardware damage.
Share article:
Get Recoverit Get Recoverit