How to Format an SD Card in Debian Linux

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Linux distributions use the "mkdosfs" command to format SD cards.

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.


Step 1

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

Video of the Day

Step 2

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 3

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

Step 4

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


Step 5

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 6

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




Report an Issue

screenshot of the current page

Screenshot loading...