Monday, June 18, 2007

How to format your flash drive

This is how you can format your flash drive(thumbdrive, pendrive) in any linux machine

1. To see what is the filesystem for your flashdrive
  • type -> df



2. Type -> mkfs /dev/sdb1
(The /dev/sdb1 is according to your outcome of the df command previously: refer above diagram)
This command will format the flash drive to ext3 format which is the default.
To format it to fat;
type -> mkfs -t vfat /dev/sdb1

11 comments:

  1. Blackorga,

    What's the difference if we command direcly the "mkfs -t vfat /dev/"device" to format the flash drive?

    ReplyDelete
  2. You can use "mkfs" to format the drive to ext3 and use "mkfs -t vfat" to format the drive to fat32

    ReplyDelete
  3. hi,

    this is a complete page on the topic..

    http://www.ehow.com/how_1000631_hard-drive-linux.html

    ReplyDelete
  4. Its hard to find the quality post but you have done a nice job buddy.

    ReplyDelete
  5. AnonymousMay 17, 2010

    Very useful. Thanks!

    ReplyDelete
  6. Useful information!!! I guess this video can help you out, check out USB Protection

    ReplyDelete
  7. Can you explain why my OS is asking me to unmount first before formatting.Can' it format when the drive is formatted.Anyway great post,thanks a lot

    ReplyDelete
  8. You really did a great job on that! useful content for people.Linux Flash Drive

    ReplyDelete
  9. Thanks for the help!

    ReplyDelete
  10. AnonymousMay 06, 2013

    #1. fdisk -l
    #2. umount /dev/sdc1
    #3. mkfs.vfat /dev/sdc1

    ReplyDelete