How to format USB in Linux

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??
jl66ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

themrrobertCommented:
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

Bingo!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
themrrobertCommented:
You will now be able to mount the volume like:

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

:)
jl66ConsultantAuthor Commented:
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?

CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

PapertripCommented:
Don't give a device name to fdisk, just do 'fdisk -l' like themrrobert said.
KishorDasCommented:
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>

Ex.
# 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.
jl66ConsultantAuthor Commented:
Thanks a lot. It is helpful.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.