How to Format an SD Card in Debian Linux

In order for a digital camera, MP3 player or other digital device to use an SD card, it must be formatted with either the FAT16 or FAT32 file system. These are DOS Windows file systems and are not native to the Linux operating system. Debian Linux and other Linux distributions use the "mkdosfs" command to create the FAT16 and FAT32 file systems. To format an SD card, the card cannot be "mounted" or accessible for use.

...
Linux distributions use the "mkdosfs" command to format SD cards.

Step

Open a terminal window. The terminal window will be found under the "Accessories" sub menu of the "Applications" menu.

Step

Type the command "df" to determine the location of the SD card. It will be named something like "/dev/sdb2." You will also need to take note of the directory where it is mounted, such as "/media/SDCard."

Step

Type the command "su" to switch to the root user.

Step

Type the command "umount /dev/sdb2" to unmount the SD card. This will make the disk inaccessible for use.

Step

Type the command "mkdosfs /dev/sdb2 -F16" to format the SD card with the FAT16 file system. If you want to use the FAT32 file system, type the command "mkdosfs /dev/sdb2 -F32."

Step

Type the command "mount /dev/sdb2 /media/SDCard" to remount the SD card.