PDF download Download Article PDF download Download Article

Ubuntu Linux has several utilities for formatting your USB drive. You can use the Disks utility to format any drive or volume with a GUI interface or use the mkfs.vfat command in a terminal window. In either case, you can have your USB drive formatted in just a few minutes.

Quick Steps

  1. Open the Disks tool.
  2. Select one or more volumes on your USB drive.
  3. Click the gear icon and select Format.
  4. Select a Quick format and choose a file system.
  5. Click Format to erase and reformat the drive.
Method 1
Method 1 of 2:

Using the Disks Utility

PDF download Download Article
  1. You'll see Disks appear in the Applications results.
  2. A list of connected devices will appear in the left frame.[1]
    Advertisement
  3. Its details will appear in the right frame.[2]
  4. Most USB drives will only have one volume, but if yours has multiple volumes, you can select one or all of them.
  5. This will open the formatting options.
  6. A Quick format will not erase any data on the drive. A Slow format will erase all of the data and check for errors on the drive.[3]
  7. There are several different file systems that you can choose from.
    • For maximum compatibility with other devices, select "FAT" (FAT32). This will work on all computers and virtually any other device that works with USB drives.[4]
    • If you're just planning on using the drive with Linux, select "ext3." This will allow you to use Linux's advanced file permissions.
  8. Click the Format button and wait for the USB drive to be formatted. This may take a while for larger drives, and erasing all of the data will add to the time it takes.
  9. Advertisement
Method 2
Method 2 of 2:

Using the Terminal

PDF download Download Article
  1. You can open this from the Dash, or by pressing Ctrl+Alt+T.
  2. lsblk and press Enter. This will display a list of storage devices attached to the computer.[5]
  3. Use the SIZE column to find your USB drive in the list.
  4. You'll need to unmount the drive before formatting. Type the following command, and replace sdb1 with your USB drive's partition label.
    • sudo umount /dev/sdb1
  5. You can delete everything on the drive by entering the following command. Replace sdb with your USB drive's label.
    • sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync
    • This will take a while to process and may appear frozen.
    • On Ubuntu 16.04 and later: sudo dd if=/dev/zero of=/dev/sdb bs=4k status=progress && sync.
  6. The partition table controls the volumes on the drive. Type the following command, replacing sdb with your USB drive's label.[6]
    • Type sudo fdisk /dev/sdb and press Enter. Press O to create an empty partition table.
  7. N to create a new partition. Enter the size of the partition that you want to create. Enter the full size of the drive if you are just creating a single partition.
  8. W to write the table and exit. This may take a moment.
  9. lsblk again to view your new partition. It will be listed below your USB drive's label.
  10. Now that you've created the new volume, you can format it with the file system of your choosing. Enter the following command to format the drive as FAT32, the most compatible file system. Replace sdb1 with your partition's label:[7]
    • sudo mkfs.vfat /dev/sdb1
  11. Once the format is complete, you can safely eject your device:
    • sudo eject /dev/sdb
  12. Advertisement

Common Questions

Can Ubuntu format FAT32?

To format a flash drive in Ubuntu in FAT32, use mkfs.fat -F 32 [devicename].

How do you format a USB drive to NTFS on Ubuntu?

In a terminal, install ntfs-3g using the command sudo apt install ntfs-3g. Identify the device name with lsblk, unmount the drive, and then format it using sudo mkntfs --fast --label <new drive label> <devicename>.

How do you format a drive as exFAT on Ubuntu?

You can format a drive as exFAT in the Ubuntu Disks tool. Select the volume you want to format, click the gear, select Format Partition, select Other as the format type, and then choose exFAT from the menu.

Can Linux read exFAT formatted USB drives?

The exFAT format is supported in Linux, Windows, and macOS.

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Format a Hard Drive Using UbuntuFormat a Hard Drive Using Ubuntu
Repair a USB Flash Drive6 Ways to Repair a USB Flash Drive
Install Windows from UbuntuInstalling Windows 10 or 11 on Ubuntu: A Step-by-Step Guide
Install Gnome on Ubuntu Install GNOME Desktop on Ubuntu: Full, Minimal, & Vanilla
Uninstall Ubuntu SoftwareUninstall Ubuntu Software
Become Root in Ubuntu Get Root Access in Ubuntu Linux
Open a Terminal Window in UbuntuSimple Ways to Open a Terminal in Ubuntu
Change Keyboard Layout in UbuntuChange Keyboard Layout in Ubuntu
Install Software in UbuntuUbuntu Software Installation: The Complete Beginner's Guide
Install Ubuntu on VirtualBoxInstall Ubuntu on VirtualBox
Install Ubuntu Linux Install Ubuntu Linux: Dual Boot with Windows or macOS
Enable the Windows Subsystem for LinuxEnable the Windows Subsystem for Linux
Install Windows Programs in UbuntuEasily Run Windows Applications on Ubuntu Linux with Wine
Change MAC Address on UbuntuChange MAC Address on Ubuntu
Advertisement

About This Article

Stan Kats
Reviewed by:
Professional Technologist
This article was reviewed by Stan Kats. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 642,842 times.
How helpful is this?
Co-authors: 10
Updated: May 7, 2024
Views: 642,842
Categories: Ubuntu
Article SummaryX

1. Click the dashboard button and search for "Disks."
2. Double-click Disks.
3. Select your USB drive.
4. Select at least one volume.
5. Click Format.
6. Select a format option.
7. Select a file system.
8. Click Format.

Did this summary help you?

Thanks to all authors for creating a page that has been read 642,842 times.

Reader Success Stories

  • V. K.

    V. K.

    May 30, 2017

    "Amazing tutorial. I followed step by step (Method 2 Terminal) and my Pen Drive came back to life, which wasn't..." more
    Rated this article:
Share your story

Is this article up to date?

Advertisement