Format USB pen drive using command line on Linux


Format USB pen drive on Linux

First find the device path of the USB device using following command
fdisk -l
Output looks like this.

Now you can find the device path of the USB drive.
Suppose it is /dev/sdb1

Format pen drive in fat32 filesystem, Run following command
mkdosfs -F32 -v -n "" /dev/sdb1

Format pen drive in NTFS filesystem, Run following command
mkntfs -Q -v -L "" /dev/sdb1

Format pen drive in ext4 filesystem, Run following command
mkfs.ext4 -j -O extent -L "" /dev/sdb1

Format pen drive in ext3 filesystem, Run following command
mkfs.ext3 -L "" /dev/sdb1

Format pen drive in ext2 filesystem, Run following command
mkfs.ext2 -L "" /dev/sdb1

Format pen drive in fat16 filesystem, Run following command
mkdosfs -F16 -v -n "" /dev/sdb1

Note :
Change /dev/sdb1 with your device path.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...