How to format an SD-CARD?

I will format an sd card and i don t know the commands…

It should work on Linux/Windows/Mac

Via YaST GUI:

You can use YaST -> System -> Partitioner to (re)format your SD card (or memory stick).

Make sure you have a look carefully that you select the correct device to format though. Once selected you should get an edit box displayed. From there you can choose file system to format with etc.

The basic CLI approach:

  1. fdisk -l (to see what devices present)

  2. Unmount the relevant device first (eg /dev/sdb1) if mounted with something like

unmount /ev/sdb1

  1. Depending on intended file system, you do

mkdosfs -F 32 -n <VOLUME_LABEL> /dev/sdb1 (for FAT32)

mkfs.ext3 -L <NAME> /dev/sdb1 (for ext3)

ntfs file system needs to be done via windows

You may also need to change ownership of the the volume with chown command if required.

mkdosfs -F 32 -n <VOLUME_LABEL> /dev/sdb1

If you want to use the SD-CARD to be used in Linux, Windows and Mac, it is best to use this file system only.