How to Format an SD Card in Linux

Techwalla may earn compensation through affiliate links in this story.

Use the Linux Terminal to reformat an SD card so you can use it for transferring files with digital cameras, PDAs, mobile phones, GPS receivers, video game consoles and other devices.

Step 1

Launch Terminal

Find out where the SD card is mounted to begin the formatting process. Launch a "Terminal" window if you are not already in a terminal shell account. To launch the "Terminal" in Ubuntu Linux, select "Applications" from the menu bar and drag to "Accessories" and then to "Terminal." Release the Mouse button to launch "Terminal."


Video of the Day

Step 2

The Directory of the Mounted SD Card

Type in the following command in a new "Terminal" window to discover in which directory the SD card is mounted: sudo mount. Enter your password to see the directory list. The SD directory will be something like: "/dev/sdb..."


Step 3

Enter the following command in the "Terminal" window to un-mount the SD card: umount directory/device_name. Replace "directory" and "device_name" with the directory and device name returned in the "Terminal" from Step 2.


Step 4

The Formatted SD Card Terminal Command Prompt

Enter the following command in the "Terminal" to format the SD card and replace "directory/device_name" with the "directory/device_name" from Step 2: mkdosfs -I -F32 directory/device_name.



Report an Issue

screenshot of the current page

Screenshot loading...