1 - by Disk utility // simplest way
you can use Disks it's installed by default and easy to use.
- 1st: Click on the Dash icon
- 2nd: Search for "Disks"
- 3rd: Click on Disks
The application will shows up:
- 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...:
2- by Gparted tool
// you can install it from Ubuntu software center or you can install is by typin
sudo apt-get install gparted
3- by using Terminal
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
df
to see the usb flash drive suppose it may be /deb/sdb1
umount /dev/sdb1
that un mount the drive
mkfs.vfat /dev/sdb1
or
mkdosfs -F 32 -I /dev/sdxx
to format drive into fat32 format
来源:http://askubuntu.com/questions/22381/how-to-format-a-usb-flash-drive
参考:http://www.unixmen.com/how-to-format-usb-drive-in-the-terminal/
Understanding the above command
mkfs
mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that shall contain the filesystem. The size argument is the number of blocks to be used for the filesystem.
vfat
Formats the drive to FAT32, other formats available are mkfs.bfs, mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.minix, mkfs.msdos, mkfs.vfat, mkfs.xfs, mkfs.xiafs etc.
-n
Volume-name sets the volume name (label) of the file system. The volume name can be up to 11 characters long. The default is no label. In this tutorial my volume-name is Ubuntu.
-I
It is typical for fixed disk devices to be partitioned so by default, you are not permitted to create a filesystem across the entire device.
Running $ df after formatting displays this.
![df-after-format-unixmen](http://180016988.r.cdn77.net/wp-content/uploads/2013/07/df-after-format-unixmen.png)