Formatting a USB drive in Linux is a simple process that can be done using both graphical and command-line tools. Whether you need to prepare a USB drive for a specific file system or just erase data, Linux provides various methods to achieve this.
Method 1: Using GParted (Graphical Interface)
GParted is a powerful partition manager with an easy-to-use GUI.
- Install GParted (if not already installed):
sudo apt update && sudo apt install gparted
- Open GParted and select your USB drive from the dropdown list.
- Unmount the USB drive: Right-click on the partition and select Unmount.
- Delete existing partitions (if necessary).
- Create a new partition table (usually MS-DOS for general use).
- Create a new partition and choose a file system (e.g., FAT32, EXT4, NTFS).
- Apply the changes by clicking the green checkmark.
Method 2: Using Terminal Commands
For users comfortable with the terminal, the mkfs
command is the fastest way to format a USB drive.
- Find the USB device name:
lsblk
Identify your USB drive (e.g., /dev/sdb
).
- Unmount the USB drive:
sudo umount /dev/sdb1

- Format the drive:
- Safely remove the USB drive:
sudo eject /dev/sdb
0 Comments