Ubuntu: 格式化USB How to format a USB flash drive?

1 - by Disk utility // simplest way

 

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

 

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.

format-complete

 

Running $ df after formatting displays this.

df-after-format-unixmen
You are done and your pen drive has successfully been formatted.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值