How to format usb in linux using terminal

How to format usb in linux using terminal

Here is the step to format your usb drive using linux terminal
Step 1: Insert your usb drive. Wait till it mounts.
Step 2: Login as super user by typing su command
$ su
Password:
Step 3: Use the following command to find the device name
# fdisk -l
check out the device boot name.. for example its /dev/sdb1 in my pc.
Step 4: If you are using Ext3 type following command to format
# mkfs.ext3 /dev/sdb1
Step 5: If you are using FAT type following command to format
# mkfs.vfat /dev/sdb1
Step 6: If you need to label your usb drive use the following command to format and label
# mkfs.vfat -n ‘Label’ -I /dev/sda
Replace Label with the name you are assigning to usb drive.
Lastly unmount the USB.
This entry was posted in linux. Bookmark the permalink.