Hi guys,
I am writing this post because when i was a beginner in Linux, I didn't knew that how to format a Pen Drive from Linux. I always used windows to format pen drives or USBs. So i think, this post may be useful for the LINUX/UNIX beginners or the people who are trying to switch from windows to LINUX platform. There are many tools available freely to format these devices e.g. floppy formatter to format floppies. But i will be tell you the command line options to format these devices because i think command is really simple and easy to use.
We have many command line packages available for formatting devices but i will be discussing only 2 utilities thats is "mkfs" and "mke2fs".
for example you want to format a USB/Flash Drive/Pen Drive then use the command:-
# mkfs.ext3 /dev/sdb
or you can write alternatively
# mkfs -t ext3 /dev/sdb
NOTE:- ext3 is the file system you want to span on to the device. If you want to have a fat32 file system then use mkfs.vfat to format the device or similarly any other file system. "-t" specifies type of the filesystem.
Other command that we can use is:
# mke2fs -j /dev/sdb
NOTE:- "-j" option specifies the journalizing file system to be spanned on the device. ext3 is the journalizing file system.
Similarly, if you want to format floppy or any other device just use the device name with the command as:
# mkfs.vfat /dev/fd0
or
# mkfs.vfat anydevicename
Enjoy formatting......:)
No comments:
Post a Comment