View Full Version : [ubuntu] need terminal commands to format drive plz

July 2nd, 2010, 09:02 AM

new to Linux and am trying to use fdisk to format my USB pendrive (16GB).

All I need are the commands to format a partition to:

1- FAT32 format
2- Ext2/3/4 format
3-FAT16 format


PS No luck with gparted. Too many errors.

July 2nd, 2010, 11:02 AM
What types of errors are you getting with GParted?

Did you run GParted from the LiveCD (the recommended method for using it) and try to format the USB stick that way?

July 2nd, 2010, 11:06 AM
sudo mkfs -t vfat /dev/sd??
sudo mkfs -t ext3 /dev/sd??

man mkfs

Make sure you understand what you are doing before you do it so you don`t format the wrong thing.

July 2nd, 2010, 03:30 PM
@Rubi1200 Gparted was giving me problems running it from the hard drive. Took the hard drive out and ran it with a live CD and everything appeared to be OK. However, I am still not able to make 4 different partitions( fat32, ?, /home, swap) on a USB stick and install Ubuntu on the / partition.

@nothingspecial thanks for the warning. I'm new to Linux but can follow detection not to mess things up too much;).

Doesn't the code for Fat 32 have to have the FAT version in it? What is the difference between what you wrote and this: (sorry couldn't find insert code function)

sudo mkfs.vfat -F 32 -n "label" /dev/sdX1


PS Here is the post on what I have been trying to do but not that successful:


February 4th, 2013, 12:52 AM
the right command is:

mkdosfs -F32 -v -n "LABEL" /dev/sd?

best of luck

February 4th, 2013, 02:55 AM
Old thread closed.