How To Format a USB or External Drive on Linux/Ubuntu
Formatting a USB or external drive on Ubuntu might seem like one of those “wait, do I really want to wipe everything?” moments. But honestly, it’s pretty straightforward once you know what to do. Whether you’re trying to clear out old files, prepare the drive for other OS, or just start fresh, getting it formatted the right way is key. The thing is, if you mess up and pick the wrong drive or skip deleting old partitions, you could end up losing important data or messing up your system. So, this guide walks through the exact steps, including some tips for avoiding pitfalls.
Because of course, Linux has to make it a little trickier than Windows sometimes, but with the right commands and a careful approach, you’ll be good to go. Just know that on some setups, the disks utility can be slow or a little finicky, especially if you’re working with newer or bigger drives. Sometimes, a terminal command is faster if you’re comfortable with that. Anyway, let’s get your drive formatted without turning it into a headache.
How to Format a USB or External Drive on Ubuntu
Identify the Problem Before Wiping: Why and When
If your drive isn’t showing up correctly, or if you’re getting format errors, the first thing is to double-check you’re targeting the right device. Mistakes here, and you could delete your internal drive or important data. Also, if you’re planning to reuse the drive on Windows or Mac, FAT32 or exFAT is usually the way to go. Linux-only drives should probably be Ext4. Trust me, it’s worth double-checking. If your drive is showing errors or not mounting properly, formatting might fix that, but it can’t fix hardware issues.
Method 1: Using the Disks Utility (Graphical Way)
This is the easiest way for most folks — if you’re not super comfortable with command line, just use the GUI. It’s handy and visual, but sometimes slow and less flexible. The goal is to wipe the old partitions and create a clean one, formatted in your chosen file system.
Connect and Prepare
- Plug in your USB or external drive.
- Make sure you’ve backed up everything first — formatting deletes all data. You probably already did this, but just saying. When you connect, Ubuntu usually auto-mounts it or shows it in the sidebar, but check Files to be sure.
Open the Disks Utility
- Click on Activities (top-left corner).
- Type
Disks
in the search bar. - Hit Enter or click on Disks to launch the app.
(If you don’t see it, install it via terminal with sudo apt install gnome-disk-utility
— but most Ubuntu flavors come with it pre-installed.)
Select Your Drive Carefully
- In Disks, find your drive on the list. It usually shows up as something like Samsung SSD or SanDisk USB Drive. Triple-check it’s the right one — unplug and re-plug if needed, to confirm.
- Not sure? Look at the size, model info, or partition layout. Better safe than deleting your system drive.
Delete Existing Partitions
This step clears out any old partitions, which can cause format errors or boot issues if left behind. On some drives, this may be necessary before creating a new file system.
- Click on a partition in the lower section.
- Click the minus (−) button to delete it.
- Repeat for each partition until the drive shows as unallocated space.
Create a New Partition
- Click the plus (+) button.
- Set the size (usually max is fine unless you want multiple partitions).
- Select the format:
- FAT (FAT32) for cross-platform use (Windows/Mac/Linux)
- Ext4 if you plan to only use the drive with Linux
- exFAT if you need large files and cross-platform support (but may require additional setup on Linux)
- Pick a drive label if you want — like “Backup Drive”.
- Click Create.
Final Steps: Name and Format
- In the confirmation window, review your settings.
- Click Format or OK.
- Wait for it to finish, which may take a few seconds to a minute depending on size.
Safely Eject the Drive
- Back in Disks, click the little play or eject icon next to your drive.
- Alternatively, right-click the drive icon in Files and select Eject.
That’s it — clean and ready to use.
Extra Tips & Potential Troubleshooting
- If your drive refuses to format, try unmounting it first: in Disks, click the stop button / unmount icon, then proceed with delete/create.
- In some cases, the drive might be locked or write-protected. Check for a physical switch or try using
sudo hdparm -r0 /dev/sdX
in terminal (replace/dev/sdX
with your drive). Not all drives support this. - Need faster or more advanced control? Consider using terminal commands like
gdisk
orfdisk
for partition management andmkfs
for formatting, but be very careful — data can be lost quickly.
Wrap-up
Formatting a drive in Ubuntu is mostly about patience and attention to detail. Sometimes, you’ll run into weird errors, but a proper delete and careful selection do the trick. Switching to terminal commands can be faster if you’re familiar, but the GUI works well enough for most tasks. Either way, just double-check everything before hitting “format”, and you’ll avoid many disasters.
Summary
- Backup, backup, backup — always.
- Use Disks or terminal commands carefully.
- Choose the right file system for your needs.
- Delete old partitions before creating new ones.
- Safely eject after formatting completes.
Fingers crossed this helps
Hopefully, this saves a few hours or frustration — a formatted drive is a clean drive. If it’s still giving trouble, sometimes a reboot after deleting partitions helps, or try another USB port. Good luck, and may your drives always mount!