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.
As you can see in the screenshot. The sdb3 is the device id of the USB drive.
Now format the USB drive. There are three filesystems options to format the USB drive.
Please note to change the USB device id in the above commands. I have used sdb3 which is device id of my USB drive.
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 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.
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.