SD card

How can I format the SD card using the terminal ?

The same way you format every mass storage device.

I use fdisk to partition if needed, you talk only about “formatting” (which I interprete as the MS-DOS way of saying “creating a file system”), thus I assume your partitioning is already as you want it.

And I use mkfs for creating file systems.

But using YaST may be easier. You can run YaST from the terminal. As root: