Saturday, 21 January 2017

How To Format Pendrive In Ubuntu Using Terminal

How to format pendrive in Ubuntu using terminal? Commands to format pendrive in Linux Ubuntu command prompt. Unmount the USB drive before you begin to format it.

Find Device ID of USB Drive

Before you start formating the USB drive, you will need to know the device id of the USB drive. This drive id is used to format USB disk using terminal commands. To know the device id of the USB drive, run the command:

df -h

As you can see in the screenshot. The sdb3 is the device id of the USB drive.
format-usb-1

Format USB Drive

Now unmount the USB device. Whenever any USB drive is attached to Ubuntu Linux system, it’s automatically mounted. While the USB device is mounted you cannot format it. So to format the USB drive, first unmount it using the following command:

sudo umount /dev/sdb3

Now format the USB drive. There are three filesystems options to format the USB drive.

Format USB with Extended File System (Ext) FileSystem

This is the most preferred filesystem from Linux Ubuntu Systems.

$ sudo mkfs.ext4 /dev/sdb3

Format USB with FAT (File Allocation Table) FileSystem


$ sudo mkfs.vfat /dev/sdb3

Format USB Format with NTFS (New Technology File System)


$ sudo mkfs.ntfs /dev/sdb3

Please note to change the USB device id in the above commands. I have used sdb3 which is device id of my USB drive.

Harry

Author & Editor

A technology enthusiast and addictive blogger who likes to hacking tricks and wish to be the best White Hacket Hacker of the World.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.