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 fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 642,842 times.
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
- Open the Disks tool.
- Select one or more volumes on your USB drive.
- Click the gear icon and select Format.
- Select a Quick format and choose a file system.
- Click Format to erase and reformat the drive.
Steps
-
Click the Dash button and search for "disks." You'll see Disks appear in the Applications results.
-
Launch Disks from the search results. A list of connected devices will appear in the left frame.[1]Advertisement
-
Select your USB drive from the list of devices. Its details will appear in the right frame.[2]
-
Select at least one volume on the USB drive. Most USB drives will only have one volume, but if yours has multiple volumes, you can select one or all of them.
-
Click the Gear button underneath the Volumes and select "Format." This will open the formatting options.
-
Select what you want to erase. 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]
-
Select the file system. 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.
-
Format the drive. 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.
-
Open the Terminal. You can open this from the Dash, or by pressing Ctrl+Alt+T.
-
Type .lsblk and press ↵ Enter. This will display a list of storage devices attached to the computer.[5]
-
Identify your USB drive. Use the SIZE column to find your USB drive in the list.
-
Unmount your USB drive's partition. 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
-
Erase all of the data on the drive (optional). 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.
-
Create a new partition table. 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.
-
Press .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.
-
Press .W to write the table and exit. This may take a moment.
-
Run .lsblk again to view your new partition. It will be listed below your USB drive's label.
-
Format your new volume. 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
-
Eject your drive when finished. Once the format is complete, you can safely eject your device:
- sudo eject /dev/sdb
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
References
- ↑ https://help.ubuntu.com/stable/ubuntu-help/disk-partitions.html.en
- ↑ https://help.ubuntu.com/stable/ubuntu-help/disk-partitions.html.en
- ↑ https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#3-prepare-the-usb-stick
- ↑ https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#3-prepare-the-usb-stick
- ↑ https://devconnected.com/how-to-format-disk-partitions-on-linux/#List_Existing_Partitions_on_Linux
- ↑ https://devconnected.com/how-to-format-disk-partitions-on-linux/#Format_a_Disk_using_FAT32_filesystems
- ↑ https://devconnected.com/how-to-format-disk-partitions-on-linux/#Format_a_Disk_using_FAT32_filesystems
About This Article
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.
Reader Success Stories
-
"Amazing tutorial. I followed step by step (Method 2 Terminal) and my Pen Drive came back to life, which wasn't being recognized by Ubuntu earlier."..." more