Originally Posted by
Paqman
Does it have to be through the terminal? If not you can use the preinstalled tool called Disk Utility. Just click on the drive and hit the "format" button.
+1
But if you really want to do it through the terminal, first of all you need to know the name of your pen drive or memory cardtype. For that use the following command:It will show something like this (this is my output, yours could be diferent):
Code:
~$ dmesg | tail
[ 7271.588923] sd 3:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 7271.598479] sd 3:0:0:0: [sdb] No Caching mode page present
[ 7271.598490] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 7271.657575] sd 3:0:0:0: [sdb] No Caching mode page present
[ 7271.657592] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 7271.665830] sdb: sdb1
[ 7271.712364] sd 3:0:0:0: [sdb] No Caching mode page present
[ 7271.712378] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[ 7271.712387] sd 3:0:0:0: [sdb] Attached SCSI removable disk
Then unmount your pen drive using the following command:
Code:
sudo umount /dev/sdb1
After that enter the following command to format your pen drive with FAT32 partition:
Code:
sudo mkfs.vfat -n 'label_name' -I /dev/sdb1
If you want to format it to ext4, then the command to run has to be:
Code:
sudo mkfs.ext4 -n 'label_name' -I /dev/sdb1
Bookmarks