DEV Community

Full Stack Hacker
Full Stack Hacker

Posted on

Format USB FAT32 in Ubuntu

Step 1: Locate USB Drive

Open the terminal and run the following command: df

Step 2: Unmount and Format USB Drive

Unmount the USB drives before formatting. To do so, run this command:

sudo umount /dev/sdb1
Enter fullscreen mode Exit fullscreen mode


After unmounting, format the USB drive using the preferred file system (replace sdb1 with the name of your device):

  • To format a USB drive with FAT32 file system, use:
  sudo mkfs.vfat /dev/sdb1
Enter fullscreen mode Exit fullscreen mode

Step 3: Verify USB Drive Formatting

Confirm the formatting process has completed successfully:

sudo fsck /dev/sdb1
Enter fullscreen mode Exit fullscreen mode

Top comments (0)