How To Format An Ubuntu Stick

Table of contents:

How To Format An Ubuntu Stick
How To Format An Ubuntu Stick

Video: How To Format An Ubuntu Stick

Video: How To Format An Ubuntu Stick
Video: How to format pendrive in ubuntu 20.04 2024, December
Anonim

A person who has recently switched to Linux often does not know how to perform even the simplest operations at first. One of these operations is formatting flash drives and memory cards. To do this, you will have to use the command line.

How to format an Ubuntu stick
How to format an Ubuntu stick

Instructions

Step 1

Before connecting to a computer, put the USB flash drive into write resolution mode. Such a translation is carried out by a miniature switch located on its body. If there is no such switch, the drive is always in this mode.

The same switches are sometimes found on SD cards, as well as on adapters for installing Mini SD and Micro SD cards into card readers.

Step 2

By connecting a USB flash drive or installing a card in a card reader, do not rush to start formatting right away. Be sure to transfer all data from it to your computer hard drive. If the file system is corrupted, and formatting is done precisely for this reason, pull out at least those files that lend themselves to this.

Step 3

If very important data is stored, but it was not completely removed, contact a data recovery specialist before formatting. Perhaps he will be able to extract some more files from the media.

Step 4

After completing the data extraction, unmount the flash drive or card with the umount command. Without this, you will not be able to start formatting. But do not disconnect the media with the elect command - after that it will stop responding to calls until the next reconnection.

Step 5

Usually, when connected, a flash drive or card is automatically assigned the designation / dev / sda, and the only partition on it is / dev / sda1. Sometimes a medium has several sections. Check if this is the case using the fdisk utility:

fdisk / dev / sda

It allows you to view the table of sections, delete them and add new ones. The order of its use differs little from the order of using the utility with the same name in DOS and Windows, and therefore does not require explanation.

Step 6

Complete formatting with the command:

mkfs.vfat -c -F 32 / dev / sda1

If necessary, replace / dev / sda1 with a different partition name. Please note that full formatting is a lengthy process, regardless of the operating system, but it allows you to check the physical integrity of the media. If you are sure of its physical integrity, perform a quick format, which takes less than two minutes. To do this, run the same command, omitting the "-c" switch.

Step 7

Mount the partition again as usual. There shouldn't be any files on it. Now check if the media has formatted correctly. Copy a few small files to the partition, unmount and unplug the USB flash drive or card, plug it back in and mount it. If the files remain in place, the operation was successful.

Recommended: