How to format a USB drive or SD card on Ubuntu

Here are the best methods of formatting the USB drive and SD cards on your Ubuntu PC by GUI, as well as the command-line methods. Most of these methods should also work with other Debian based Linux distros, including elementary OS, Zorin OS, Tails, etc.

Now and then, we need to format our USB flash drives and SD cards for various reasons. Some of these include changing the file system (NTFS, FAT, FAT32, etc.), deleting all current data, or remove a virus or malware present in the drive.

In this post, we are going to look at how you can format your USB drive or the SD card on the Ubuntu operating system. Most of these methods will also work with other Debian based operating systems like Kali Linux, elementary OS, Zorin OS, Parrot, Tails, Debian, and many more.

Ubuntu OS enables users to format their drives in several ways. For this article, we will look at both graphical ways and command-line tools.

Format a USB drive using Graphical tools

Some of the graphical disk management tools that we will use include Gparted, the Disks utility, and File manager.

1. Using the Disks utility

Disks utility is the default disk management tool for all Ubuntu systems. It is pre-installed and thus comes at the top of the list. With a clean and straightforward user interface, this tool is easy to use even for beginners getting started with Linux distributions.

Disks Utility
Disks Utility

This tool comes bundled with amazing features like Drive formatting, Edit partition, Edit file system, Repair file system, create and restore partition image, and many more. Let’s focus on the formatting feature.

Disks Utility Features
Disks Utility Features

Step 1) Plug the USB drive into your PC. Ensure it is working and listed on the file manager.

USB drive listed in file manager
USB drive listed in the file manager

Step 2) Launch Disks utility from the applications menu.

Launch Disks from application menu
Launch Disks from the application menu

Step 3) Select the USB drive you want to format. For this post, we will work with an 8 GB USB drive.

Select the USB drive to format
Select the USB drive to Format

Step 4) Click on the Settings button and select the Format option.


This action will open a window with several options to choose before formatting your USB drive. You will need to enter the Volume name, which will become the new label for your USB. Select whether to Erase all data in the USB drive. This process is efficient if you don’t want anybody running data recovery tools on the USB; however, it will take longer. Lastly, you will need to select the file system to use ion the drive (NTFS, EXT4, FAT, or Other).

Set options on the USB drive
Set options on the USB drive

Step 5). Once done, click on the Next button present on the top-right corner of the window. A window will open listing your selected drive and giving you a warning that all data will be lost. If you are contented with the information contained, click Format.

Format the USB drive
Format the USB drive

The process of formatting the USB drive will begin. Time-taken will matter on the options set, the processing speed of your PC, and the general write speed of your USB drive. Once done, you should be able to see it listed on the files manager.

2. Using File Manager

Formatting a USB drive using the file manager is the easiest method. This method makes use of the Disks utility that we discussed above, but you don’t have to go the long process of launching the Disk utility. Instead, we use the right-click context menu.

Step 1) Plug your USB drive into the PC.
Step 2) Open the file manager window and check that it is listed as shown below.

USB drive listed in file manager
USB drive listed in the file manager

Step 3). Right-click on the USB-drive and choose the format option.


Set the Volume name and select the file system of choice. Once done, click on the format option.

Set options on the USB drive
Set options on the USB drive.

When the process is completed successfully, you should be able to see your USB drive listed on the file manager with the new volume name.

3. Using GParted

Gparted is an open-source disk management tool for the Linux system. Unfortunately, it doesn’t come pre-installed in Ubuntu. Use the command below to install GParted for your Ubuntu OS via Terminal.

sudo apt-get install gparted

Once the app is installed, launch it from the applications menu.

launch gparted Applications menu
launch Gparted Applications menu

Since it requires root privileges to run, a window will pop-up prompting you to enter the root password. The GParted window will open, and it will start loading your disks. Note, while using GParted, you will not be able to access unmounted drives and partitions.

Gparted Window
Gparted Window

Gparted comes with quite an intuitive user interface with a lot more functionalities compared to the Disks utility. Additionally, if you are working with a dead hard drive, you can download the ISO file, create a bootable USB drive and use it to boot your PC or laptop and work on the hard-drive.

Let’s look at the step by step procedure of formatting a USB drive with GParted.

Step 1). Select the drive you are working on, from the top-right corner. You can see the image below.

Select the USB drive to format
Select the USB drive to Format

Step 2). If the USB drive were already mounted, the format option would be grayed. Therefore, we need to unmount it. Right-click on the USB drive and select the Unmount option.

Unmount USB drive
Unmount USB drive

Step 3). Once the drive is unmounted, we can now start the formatting process—right-Click on the USB-drive and select, “Format to” option. You will also need to choose the file system you want to use on the drive.

This action will be added as a pending operation. You can add as many operations as you like.

Pending Operations
Pending Operations

Step 4). To complete the formatting process, you need to click the “Apply all operations” button. It’s a green tick icon at the top of the Gparted window.

Apply all Operations
Apply all Operations

Step 5). A window will pop-up, warning you that the operation will lead to complete loss of data on the USB drive. Click the Apply button to continue or Cancel to stop the process.

Click Apply to Continue Formatting.
Click Apply to Continue Formatting.

The formatting process will start. A progress window will load, displaying the general progress.

Formatting Progress Gparted
Formatting Progress Gparted

Step 6). Once the operation is complete, a window will open to notify you. Click the close button.

Format process complete
Format process complete

Your USB drive is formatted! Close the Gparted window, and you should now see your USB-drive listed on the file manager.

Format a USB drive using the Command-line (Terminal)

Other than the use of Graphical tools, Ubuntu enables users to format drives using one of its most potent utilities – Terminal. The method is recommended for users with a good experience working with Linux commands.

Step 1) Insert your USB drive and Launch the Terminal.

Step 2) Identify the drive you want to format by running any of these commands.

sudo df -h

df command
df command

sudo fdisk -l

The Fdisk command
The Fdisk command

Note, you should be very careful here; otherwise, you will end up formatting the wrong drive. For this post, we will work with dev/sdb1.

Step 3). If the USB drive is mounted, we will need to unmount it. Execute the following commands.

sudo umount <drive label>
sudo umount dev/sdb1

Step 4). Now give a command to format the drive. It will differ depending on the file system you want to use. Execute any of the commands below, keeping a focus on the different file systems.

sudo mkfs.vfat /dev/sdb1
sudo mkfs.ntfs /dev/sdb1
sudo mkfs.ext4 /dev/sdb1

When the process is complete, your drive should be formatted to your desired file system. You should be able to access it from the file manager.


That’s all about the best methods of formatting the USB drive and SD cards on your Ubuntu PC by GUI, as well as the command-line methods. Most of these methods should also work with other Debian based operating systems.

Is there any other method you use which we have not listed here? Feel free to let our readers know in the comment section. If you find this article useful, don’t forget to share the link with friends.

Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.


Please enter your comment!
Please enter your name here




Basics of Working with the SQLite Database in Python

A database is one of the most useful and popular files for storing data; they can be used to store any kind of data, including text, numbers, images, binary data, files, etc. SQLite is a relational database management system based on the SQL language. It is a C library, and it provides an API to work with other programming languages, including Python. It does not require a separate server process to be run as needed in large database engines like MySQL and Postgresql.

5 Ways to Check the Linux Version

When most people talk of Linux, they are always referring to a Linux distribution. However, this is not the case. Linux itself is a kernel which acts as a bridge between user applications and the hardware. When we talk of a Linux distribution, we refer to an operating system developed from the Linux kernel. A distribution comes with a package manager, pre-installed applications, a Desktop Environment, and several more features.

Getting Started with Linux Operating System

The Linux operating system brings forth a vibrant mix of features and security, making it the best alternative to macOS or Windows operating systems. In this post, we will give you a master guide on Getting started with Linux systems - taking you from a complete beginner to a level where you can begin testing the various Linux distributions available with much ease.

How to Create a Comprehensive Mail Server on Ubuntu

Postal is a free and open-source mail server used to send and receive emails. It comes loaded with tons of excellent features and functionalities, making it extremely popular among large organizations as well as in enterprise settings.

The 10 Best Linux Performance Monitoring Tools

Do you want to monitor the performance of your Linux system? Are you looking for some powerful performance monitoring tools to help you out? If you agree, it's your day as we have put together a detailed list of the ten best Linux performance monitoring tools.

How to Boot your Windows or Linux PC from a USB Drive

Sometime back, the process of installing an operating system required users to pop a bootable media disk into their DVD or CD drive and use it to boot the PC. But times have changed. Nowadays, the most common way of installing an OS is booting from a USB drive. The use of USB drives is further propelled by the current production of slim and lightweight laptops with no support for DVD/CD drives.


Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.
Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.

Top 10 Reasons to use Xfce as your Desktop Environment

There are many choices for desktop environments for Linux based operating systems. Mainly, you can install any DE of your choice on most of the Linux based distributions, even if they are not offered as a package officially. In our recent articles, we discussed the best of KDE and Cinnamon. In this article, we wish to present to you the top reasons why you should consider Xfce as your desktop environment.

How to create a Live Linux USB drive using Etcher

In the Linux community, one thing is common between almost all of the users: trying out different Linux distributions. Most of the Linux based distributions have a great way of being tested as they provide ISO images for creating a Live USB.

VIDEO: Linux Lite 4.8 Features and Desktop Tour

Linux Lite eases Windows 7 users transition to Linux much more comfortable by offering simple software like Team Viewer, VLC, Firefox, TimeShift backup utility, and a full Microsoft Office compatible office suite in LibreOffice.

6 Best Linux Distros for Laptops

Whether buying a Linux pre-installed laptop or selecting a Linux distro for your existing laptop, there are many things to consider. Let's take you through some of the best Linux distros that are optimized for Laptops in this 2019 edition of the article. Read on.