Search This Blog

Saturday, October 25, 2008

To Format a UsB pen drive using Linux terminal

Insert your USB Pendrive. Let it get detected and mounted. Open Terminal. Type The Following commands 1. Unmount your pen drive by using umount /dev/sda

(In your case, please substitute sda with the appropriate device, listed above.

2. use the mkfs.vfat command to format to FAT32 filesystem, or mkfs.ext3 to format to ext3 filesystem

mkfs.vfat -n ‘Label’ -I /dev/sda

Replace Label with the name you want the pen drive to have.

3. That’s it! When done formatting, you’ll be returned to the prompt temp@HACKHOME:~$ mkfs.vfat -n ’hack’ -I /dev/sda mkfs.vfat 2.11 (12 Mar 2005) sathya@shaman:~$

Remove and insert the pen drive to have mounted again!

No comments: