Buy Linux Terminal Books

The Linux Command Line, 2nd Edition: A Complete Introduction

Linux Pocket Guide

Category: Linux Terminal

Added: 17th of September 2019

Viewed: 1171 times

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

This tutorial works in Ubunbu, Kubuntu, Xubuntu, Lubuntu, Ubuntu Mate and other Ubuntu based distributions. The tutorial also works in Linux Mint and other Debian based distributions.



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.

btrfs
ext2 / ext3 / ext4
fat16 / fat32
hfs / hfs+
linux-swap
lvm2 pv
nilfs2
ntfs
reiserfs / reiser4
udf
ufs
xfs

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.

Other Tips & Tutorials

Linux Terminal

Capture screenshots of websites using cutycapt in different formats using the terminal in Ubuntu and Ubuntu based distributions

Posted: 15th of November 2020

Views: 69

Linux Terminal

Display a calendar in the terminal

Posted: 6th of November 2020

Views: 67

Linux Terminal

Create a simple cronjob in Linux

Posted: 20th of October 2020

Views: 161

Linux Terminal

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

Posted: 16th of August 2020

Views: 219

Linux Terminal

Convert a PDF document to text or html using pdftotext, pdftohtml in Linux using the terminal

Posted: 3rd of August 2020

Views: 254

Linux Terminal

List files in a directory using the ls command

Posted: 22nd of July 2020

Views: 232

Linux Terminal

How to access HP Linux Imaging and Printing System set up on Ubuntu using the terminal

Posted: 13th of November 2019

Views: 540

Linux Terminal

Where are the log files located in Linux

Posted: 16th of October 2019

Views: 642

Linux Terminal

Oracle VirtualBox, Unable to insert virtual optical disk

Posted: 11th of October 2019

Views: 2176

Linux Terminal

Oracle VirtualBox only displaying 32-bit version(s), when setting up new Virtual Machine on Linux

Posted: 11th of October 2019

Views: 714