Category: Linux Terminal

Added: 17th of September 2019

Viewed: 7,270 times

Using GParted in Linux to format a hard drive, flash drive, SD Card

If you ever need to format your hard disk, USB flash drive, and SD cards in your Linux distribution, you can install a package called GParted.

GParted can do more than just format your drive, you can create, resize, delete partitions, label, set new UUIDs and also copy and paste. Gparted also works with the following file systems.

ext2 / ext3 / ext4
fat16 / fat32
hfs / hfs+
lvm2 pv
reiserfs / reiser4

If you don't have Gparted installed on your Linux distribution, open your terminal and enter the following command, or install using the software centre or package manager in your distribution. If your not using an Ubuntu based distribution installation will be different.

sudo apt-get install gparted

Once installed you can start Gparted from the terminal, or from the main menu on your distribution. Gparted requires you to enter your root password.
sudo gparted

Once Gparted has launched, click on the Gparted menu at the top and click on Refresh Devices

Next select the drive that you wish to format from the menu. Please ensure you select the correct drive

Click on the partition table

Right click on the partition table, select Format to and select the filesystem you wish to format too

Click the Apply All Operations button, and then click Apply

Your hard disk / USB flash drive / SD card has now been formatted