How to format USB in Linux

Posted on 2011-10-02
Last Modified: 2012-05-12
Would like to format my USB and make a FAT32 file system in the USB memory stick on Federo 10 linux server. How to do it? Do any gurus offer some tips or links??
Question by:jl66
    LVL 13

    Accepted Solution

    easy do this:

    (as root):

    type fdisk -l  to identify the drive (/dev/sdc in my system)

    then, type cfdisk /dev/sdc

    (or whatever your drive name)
    use this tool to remove the existing partition and create a new, Fat32 / vfat partition.

    after you create the partition, use the arrow keys to move to the "Write" option then save to disk.

    Quit the tool,

    At the prompt, type:  mkfs.vfat /dev/sdc1

    LVL 13

    Assisted Solution

    You will now be able to mount the volume like:

    mkdir /mnt/sdc1
    mount /dev/sdc1 /mnt/sdc1


    Author Comment

    themrrobert: thanks a lot for your tip. Closely following it, we got

    [root@bare ~]# fdisk -l /dev/sdb1

    Disk /dev/sdb1: 2003 MB, 2003828224 bytes
    62 heads, 62 sectors/track, 1018 cylinders
    Units = cylinders of 3844 * 512 = 1968128 bytes
    Disk identifier: 0x6dec580f

         Device Boot      Start         End      Blocks   Id  System
    [root@bare ~]#

    Nothing shows up for USB. How to proceed it?? Do I need to create sth first?

    LVL 21

    Assisted Solution

    Don't give a device name to fdisk, just do 'fdisk -l' like themrrobert said.
    LVL 2

    Assisted Solution

    First Use the command   fdisk -l to list all the detected mass storage devices on your computer. Then carefully observe the output of the command and find out the device identificaion i.e. /dev/sdb or /dev/sdc by looking into the size of your storage device.

    Then unmount the usb disk, if it is auto mounted by your OS by right clicking on the usb disk, then select the unmount command.

    Then as root, use the mkfs.vfat   <your device id with partition no>

    # mkfs.vfat   /dev/sdb1

    Assuming your disk is identified as /dev/sdb and it has a single partition. (sbd1).  The file system vfat is used because it can be accessible by both windows and linus system. Otherwise you can use linux specific file system like ext3/ext4 along with the mkfs cmmand.

    Author Closing Comment

    Thanks a lot. It is helpful.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now