Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Windows there is a straightforward "Format" option in a flash drive's right-click pop-up menu. Where's that in Ubuntu?

share|improve this question
I tried to format my mp3 player with widows-7 and failed. gparted solved the issue. – HabeebPerwad Mar 26 '14 at 15:24

12 Answers 12

up vote 131 down vote accepted

You can use Disks it's installed by default and easy to use.

enter image description here

  • 1st: Click on the Dash icon
  • 2nd: Search for "Disks"
  • 3rd: Click on Disks

The application will shows up:

enter image description here

  • 1st: Choose the USB flash drive
  • 2nd: Click on the "gear" icon and choose "Format"

This little window will appear, just choose the option you want and click on Format...:

enter image description here

share|improve this answer
Thanks.That's it. But one more question comes up. In FS choice it offers just FAT alongside with ext2, ext3 and encrypted FAT. But is this meant to be FAT16, FAT32 or exFAT? In my particular case I'd prefer FAT16 as my flash drive is only 1GB in size. – Ivan Jan 20 '11 at 8:46
no you don't have to install gparted just goto System -> Administration -> Disk Utility and format. – Alaukik Jan 20 '11 at 11:07
I don't think there's any reason to choose FAT16 over FAT32. – loevborg Jan 20 '11 at 12:18
FAT16 will waste more of your limited space. It should not be used on anything over 256mb or so. – psusi Jan 20 '11 at 15:28
In 12.10 and on, the "format..." option has disappeared. Disk utility has a long-term bug that makes formatting Your only option is to use GParted --- see next answer. – Rmano May 15 '13 at 10:45

in ubuntu there is many method by which you can format your pendrive

1 - by Disk utility see the video // simplest way

2- by Gparted tool see the video

// you can install it from Ubuntu software center or you can install is by typing

sudo apt-get install gparted

3- by using Terminal see the video

go to super mode by typing "su" followed by super mode password

fdisk -l

that will show all the volume in your pc or you can also use the


to see the usb flash drive suppose it may be /deb/sdb1

umount /dev/sdb1

that un mount the drive

mkfs.vfat /dev/sdb1

to format drive into fat32 format

share|improve this answer
+1 & thanks for command line – Ioan Paul Pirau Mar 1 '15 at 0:57
It will work even if the usb is write protected. Thanks alot. – Mansoorkhan Cherupuzha Feb 5 at 12:07

gparted - the only way to go with formatting drives and HDs etc. It's available for download in the Ubuntu Software Center, just search for gparted.

share|improve this answer

The Command-Line Way

In case you can't get your device formatted from the GUI, try this way.

  1. Open the Terminal (Ctrl + Alt + T)

  2. List your block storage devices by issuing the command lsblk
    Then identify your pen drive by it's SIZE. In my case its /dev/sdb

    enter image description here

  3. Erase everything in the pen drive (OPTIONAL):

    sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync

    Replace /dev/sdb with your corresponding device. This will take some time. It will pretend to stuck. Just be patient.

for example:

dd if=/dev/zero of=/dev/sdb bs=4k && sync
dd: error writing '/dev/sdb': No space left on device

1984257+0 records in
1984256+0 records out
8127512576 bytes (8.1 GB) copied, 1236.37 s, 6.6 MB/s
  1. Make a new partition table in the device:

    sudo fdisk /dev/sdb

    • Then press letter o to create a new empty DOS partition table.
  2. Make a new partition:

    • Press letter n to add a new partition. You will be prompted for the size of the partition. Making a primary partition when prompted, if you are not sure.

    • Then press letter w to write table to disk and exit.

  3. Format your new partition.

    • See what is your new partition with a command lsblk
      In my case it is /dev/sdb1

    enter image description here

    • Issue the command below to format the new volume:

      sudo mkfs.vfat /dev/sdb1

      Please replace /dev/sdb1 with your corresponding device.

    • Eject the device:

      sudo eject /dev/sdb

share|improve this answer
if you lost patience while waiting for dd you can always ps aux | grep dd copy process id then watch -n 4 kill -USR1 pid – Donald Derek May 9 '15 at 18:52

Run the below commands to format the usb to fat32 filesystem from terminal,

sudo su
fdisk -l 

(this helps to discover your pendrive /dev/sdxx)

umount /dev/sdxx

then format your device to FAT32

mkdosfs -F 32 -I /dev/sdxx

Where "xx" is from the command fdisk -l which denotes your usb drive's last letters.

share|improve this answer
doesn't work in Ubuntu 14.04 . Says "Error synchronizing after initial wipe: Timed out waiting for object (udisks-error-quark, 0)" – Nabin Khadka Aug 21 '14 at 7:25
works just fine on 14.10, apparently it was rather hardware glitch in comment above. – silpol Mar 6 '15 at 6:11
Easy and straightforward! (@14.10) – Milkncookiez May 11 at 19:43

Here are some instruction :

  • Plug your flash drive into an empty USB port and back up any data on the drive. Open the main menu, move your cursor over "Accessories" and then click on "Terminal." At the terminal prompt, type sudo apt-get install gparted and press Enter.
  • Enter your Ubuntu administrator password when prompted and press Enter. This will download and install GParted, which is an open-source drive partitioning program
  • Go to the Ubuntu main menu after the installation is complete, move your cursor over "System," select "Administration" and click "Partition Editor." Enter your administrator password when prompted and click "OK."
  • Click on "GParted" in the toolbar. Hover over "Devices" and select your USB flash drive from the list (dev/sdb1, for example). Right-click on the device in the main GParted window and click "Unmount." It may take a few minutes for the device to be unmounted
  • Right-click on the device again after it is unmounted and hover over "Format to." Select the desired file system type -- RiserFS, linux-swap, Ext 2, Ext 3, FAT16 or Fat32, for example -- and click "Apply" in the toolbar. Depending on the size of the flash drive, it will take three to four minutes for GParted to complete the process.
  • Close GParted after the flash drive is formatted. To mount your USB flash drive, unplug it and then plug it back in. The drive is now ready to store data in the file format you selected.
share|improve this answer

if you are running Ubuntu 12.04 LTS then you can easily do this. just plug in your usb and in left panel you will see a USB icon. go over there and right click. there will be a option to format it.

share|improve this answer

Here is a very simple way: In linux system: use fdisk to check which is your usb disk. then use fdisk sdx,usually is sdb, to do some operation on your usb disk.

press o enter press d enter to empty your disk.

then you can plug your usb drive to a windows operation system and do the normal format.

share|improve this answer

Firstly use fdisk -l in order to see usb partition, then if:

ext == > mkfs.ext3 /dev/sda1
FAT/FAT32 ==> mkfs.vfat /dev/sda1

Note: You must be root or using sudo to do that.

share|improve this answer

I use Startup Disk Creator, installed by default, to format my USB drives.

  • Open up 'startup Disk Creator' by searching for it in the dash.
  • Insert your flash drive, it will be detected automatically.
  • Select it (in case you have more than one)
  • Press 'Erase Disk'

See screenshot below:

enter image description here

share|improve this answer

Erase all data, and create a single partition that takes up all USB with an ext4 filesystem:

printf 'o\nn\np\n1\n\n\nw\n' | sudo fdisk /dev/sdX
sudo mkfs.ext4 /dev/sdX1

Choose X based on the output of:

sudo lsblk
sudo fdisk -l

fdisk automation explained at:

share|improve this answer

Open a terminal (Ctrl+Alt+T) and enter the following command

gksu palimpsest

after the disk manager comes up, follow the instructions in this video.

share|improve this answer

protected by Community Feb 4 '14 at 2:44

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.