wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 10 people, some anonymous, worked to edit and improve it over time.
wikiHow marks an article as reader-approved once it receives enough positive feedback. In this case, 91% of readers who voted found the article helpful, earning it our reader-approved status.
This article has been viewed 573,564 times.
Learn more...
Ubuntu Linux includes several utilities that will allow you to format your USB drive. You can use the Disk Utility that comes packaged with Ubuntu, or you can use the Terminal. In either case, you can have your USB drive formatted in just a few minutes.
Steps
Using the Disks Utility
-
1Click the Dash button and search for "disks." You'll see Disks appear in the Applications results.
-
2Launch Disks from the search results. A list of connected devices will appear in the left frame.Advertisement
-
3Select your USB drive from the list of devices. Its details will appear in the right frame.
-
4Select 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.
-
5Click the Gear button underneath the Volumes and select "Format." This will open the formatting options.
-
6Select 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.
-
7Select 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.
- If you're just planning on using the drive with Linux, select "ext3." This will allow you to use Linux's advanced file permissions.
-
8Format 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.[1]
Using the Terminal
-
1Open the Terminal. You can open this from the Dash, or by pressing Ctrl+Alt+T.
-
2Type .lsblk and press ↵ Enter. This will display a list of storage devices attached to the computer.
-
3Identify your USB drive. Use the SIZE column to find your USB drive in the list.
-
4Unmount 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
-
5Erase 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.
-
6Create 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.
- Type sudo fdisk /dev/sdb and press ↵ Enter. Press O to create an empty partition table.
-
7Press .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.
-
8Press .W to write the table and exit. This may take a moment.
-
9Run .lsblk again to view your new partition. It will be listed below your USB drive's label.
-
10Format 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:
- sudo mkfs.vfat /dev/sdb1
-
11Eject your drive when finished. Once the format is complete, you can safely eject your device:[2]
- sudo eject /dev/sdb
Community Q&A
-
QuestionThere is no option for format. What do I do?Community AnswerLook for a formatting tool online for that brand.
-
QuestionWhat do I do if the steps complete successfully, but the pendrive is not showing?Community AnswerI got the same issue then I followed these steps and now Pen drive is showing. Instead of selecting the option"compatible with all systems," select FORMAT DISK->PARTITIONING->No Partitioning(Empty). Go to Settings ->Format Partition.
-
QuestionWhat do I do if I formatted my pen drive and I can't access it?Ashish KumarCommunity AnswerClick new partition to use it and select FAT to work on both Windows and Linux.
References
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.