How to Format an SD Card in Debian Linux

Updated July 20, 2017

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.

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

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."

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

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

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."

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

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Kristen Waters has been writing for the computer industry since 2004. She has written training materials for both large and small computer companies as well as how-to and informative articles for many online publications. She holds Bachelor of Science degrees from both York College of Pennsylvania and the University of Maryland.