DIGIT-ARC read-only archive · snapshot: July 23, 2026

Formatting USB Drives in GNU/Linux

5 posts · originally from https://geek.digit.in/community/threads/formatting-usb-drives-in-gnu-linux.60828/

anantkhaitan
anantkhaitan Original post #1
Jun 19, 2007 at 8:38 PM
Guide me how do I format any media device be it a hard disk partition or USB drive?

After a bit of Googling I got mkfs : Linux/Unix used to build a Linux file system on a device.
And after going through man pages I issues this for my pen drive:
Code:
mkfs -t vfat -F32 /dev/sda1
But unfortunately : "command not found" :(
I am also not getting any package from where I can install it. (if anyone can give me a link)

Avoid GParted Live CD
praka123
Jun 19, 2007 at 9:12 PM
try as "sudo"
or ask? in terminal:
Code:
whereis mkfs
anantkhaitan
Jun 19, 2007 at 9:26 PM
^^
Great man.. It was in /sbin :)
Code:
$  sudo /sbin/mkfs.vfat -F32 /dev/sda1

One more great thing I can specify Volume Label too:
Code:
sudo /sbin/mkfs.vfat -F32 -n AnantFlash /dev/sda1
praka123
Jun 19, 2007 at 9:30 PM
^tada-U seems to be a g33k in Linux/Unix CLI soon!:DBest ya Lux
anantkhaitan
Jun 20, 2007 at 10:17 AM
Thanks Prakash.. Now I am feeling weightless :D