USB flash drive formatting using Bash
1. First make sure the USB device is not mounted, if so please unmount it.
2. Format the USB device in FAT32 format
sudo mkfs.vfat / dev/sdb1
Note: You can use mkfs.ext3 to format to ext3 file system.
Note: Please enter your device name correctly otherwise you will erase all your data.
3. Format and change the label of the USB drive.
sudo mkfs.vfat-n 'sandeep' / dev/sdb1
That’s all. ENJOY!