x32x01
  • by x32x01 ||
How to Format USB Drives in Linux
How to Format USB Drives in Linux
The easiest and fastest way to format a USB drive in Linux is through the terminal. The procedure consists of three steps:
  1. Locating the USB drive.
  2. Unmounting and formatting the USB drive.
  3. Verifying the process was successful.
Follow the instructions below to format a USB drive using the terminal.

Step 1: Locate USB Drive
Open the terminal and run the following command:
Code:
df

The terminal prints out a list of all mounted partitions and relevant information: used space, available space, used space percentage, and the path.
Locate the USB in the list and find the corresponding device. In this example, the USB drive is /dev/sdb1.

Note: If you are unsure of the drive designation, unplug the USB drive temporarily before running the df command again. The device that is now gone from the list is your USB device.
list-all-partitions.png

Step 2: Unmount and Format USB Drive
Unmount the USB drives before formatting. To do so, run this command:
Code:
sudo umount /dev/sdb1
unmount-usb.png
After unmounting, format the USB drive using the preferred file system (replace sdb1 with the name of your device):
  • To format a USB drive with FAT32 file system, use:
Code:
sudo mkfs.vfat /dev/sdb1
  • To format a USB drive using the NTFS file system run:
Code:
sudo mkfs.ntfs /dev/sdb1
  • To format a USB drive in accordance with the exFAT file system use:
Code:
sudo mkfs.exfat /dev/sdb1

Step 3: Verify USB Drive Formatting
Confirm the formatting process has completed successfully:
Code:
sudo fsck /dev/sdb1

A USB drive with no files indicates successful formatting.
verify-formatting-terminal.png
 

Similar Threads

x32x01
Replies
0
Views
218
x32x01
x32x01
x32x01
Replies
0
Views
634
x32x01
x32x01
x32x01
  • x32x01
Replies
0
Views
227
x32x01
x32x01
x32x01
  • x32x01
Replies
0
Views
258
x32x01
x32x01
x32x01
  • x32x01
Replies
0
Views
242
x32x01
x32x01
TAGs: Tags
format usb drives

Register & Login Faster

Forgot your password?

Latest Resources

Forum Statistics

Threads
517
Messages
518
Members
45
Latest Member
Tacola
Back
Top