How to Format a USB Drive in Ubuntu

thumbnail

There are several utilities in Ubuntu Linux that allow you to format a USB stick. You can use the Disk Utility that comes with Ubuntu, or use the terminal to format the USB. Either way, formatting can be done in minutes.

step

Method 1

Using Disk Utility

1 Click the Dash button and search for "disk". The Disk program is visible in the application search results.

2 Open the disk program from the search results. A list of connected devices appears in the left pane.

3 Select the USB stick from the device list. Its details are listed in the right panel.

4 Select at least one volume on the USB drive. Most USB drives have only one volume, if there are many volumes on the USB drive, you can select one volume or select all.

5 Click the gear button in the upper right and select Format. Open formatting options.

6 Select the data you want to erase. Quick format does not overwrite existing data, while slow format completely overwrites existing data, deletes all data and looks for errors.

7 Select the file type. There are several different file types for you to choose from. The most compatible with other devices is "FAT" (FAT32). It works with basically all USB-capable computers and devices. Select "ext3" if you only want to use it on Linux computers. This allows you to use Linux advanced file permissions.

8 Format the USB drive. Click the Format button and wait for the USB drive to finish formatting. If there is a lot of content on the USB flash drive and a lot of data to be erased, it will take a while to complete the formatting. X Research Source

Method 2

use terminal

1 Open a terminal. You can open a terminal from Dash, or press Ctrl+Alt+T at the same time.

2 Type .lsblk and press Enter. A list of storage devices connected to the computer will then open.

3 Find the USB stick. Use the "Size" column to find the USB drive in the list.

4 Unmount the USB partition. You need to unmount the USB before formatting. Type the following command, replacing sdb1 with your thumb drive partition label. sudo umount /dev/sdb1

5 Erase all data on the device (optional). You can enter the following command to delete all data. Replace sdb with the USB stick label. sudo dd if=/dev/zero of=/dev/sdb bs=4k && sync This process will take a while and may be stuck.

6 Create a new partition table. This partition table controls the volumes on the drive. Enter the following command, substituting the USB stick label for sdb. Type sudo fdisk /dev/sdb and press Enter. Press O to create a blank partition table.

7 Press .N to create a new partition. Enter the size of the partition you want to create. If you want to create a separate partition, enter the size of the entire USB drive.

8 Press .W to write the form and exit. This will take a while.

9 Run .lsblk again to browse for the new partition. It will be listed below the USB stick label.

10 Format the new volume. At this point you have created a new volume and can format it to the file type of your choice. Enter the following command to format it into the most compatible FAT32 file system. Replace sdb1 with the partition label. sudo mkfs.vfat /dev/sdb1

11 When finished, safely eject the USB drive. When finished formatting, safely eject the USB: X Research sources sudo eject /dev/sdb

.

Ubuntu相關問答

Related Posts