How to format hard disk, USB flash drive, and SD cards in elementary OS / Ubuntu

If you have been wondering how to get the basic task such as formatting an external hard disk, USB disk, SD card, or Micro-SD cards on Linux, you are not alone.

There is no direct GUI method to format the hard disk. It is simpler to perform formatting within the MS Windows Explorer. Although Ubuntu and the elementary OS come with ‘Files’ that offers similar functionality as the Windows File Explorer, it doesn’t come with format feature.

Thankfully, in Linux, you get the best of the software for free. Also, there is a Command-line way of doing things that are lightning fast than any other methods. For the GUI scenario, I would recommend using the GParted app. It is a free and open source software (FOSS) and is very powerful in terms of features and what it can do. Since we are discussing formatting the hard disk, let’s see how you can use it to format a storage media to almost any format you need.

Format Storage Media in Ubuntu and elementary OS

METHOD 1: Using GParted software

Step 1: Install GParted: GParted is available in ‘Software Center’ of both Ubuntu and elementary OS. Look for ‘GParted’ and install it. Alternatively, you can use apt-get in terminal to install it.

sudo apt-get install gparted

Step 2: Launch the program from ‘Applications’.

Step 3: Plugin the storage media which you want to format.

Step 4: Right-click on the drive  which you want to format and select the desired format. Typically, most of USB drives use FAT32 format, and Windows based external hard disk use NTFS. Linux can read any of these formats.

GParted Format Options
GParted Format Options

Step 5: Click on green right mark which is nothing but apply.

Step 6: GParted will confirm once again if you want to apply the changes. Go ahead an click ‘Apply’.

Format Complete
Format Complete

That’s it.

METHOD 2: From the Terminal

You can do the formatting from terminal too. Launch the terminal as root. To do that simply type root in Applications search box and click on ‘New Root Tab’. You will have to enter the root password.

Terminal - Process of formatting USB Flash Drive
Terminal – Process of formatting USB Flash Drive

Enter the following command to see the list of all storage media connected to your PC.

fdisk -l

If you have USB drive connected that you want to format, then enter the following command to see USB flash drive.

df

Typically, USB flash drives are mounted at /deb/sdb1.

Now umount the USB flash drive:

umount /dev/sdb1

Finally, enter the format command:

mkfs.vfat /dev/sdb1

The above command will format the drive to FAT32. If you want to format to NTFS, use the following instead:

mkfs.ntfs /dev/sdb1

That’s it.

Which method did you use? Please leave your comments below and do share the article with your friends on the social platforms. Remember the old saying “Sharing is caring!”.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities, especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. I hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

5 COMMENTS

  1. In Gparted, the option to format in dropdown is disabled. Useless method.
    Through terminal, fdisk -l fails to open as it displays permission denied.
    Great!
    Ubuntu 18.04 sucks

  2. I have an external 1 TB HDD. Initially it had windows os and ubuntu 16.04 os in an acer machine that crashed. I have removed it and want to use it as an external HDD. I formated using windows and the data part was successful. The one with OS went to unallocated . i want to free it so that i have the whole 1TB for data storage. Ho do i attain that either in linux terminal or in windows?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,555FansLike
365FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

The 10 Best Linux Server Distros For Home And Businesses

By the year 2020, it is estimated that there are close to 600 Linux distributions in the market. It includes both servers and Desktop versions; therefore, if you are looking for lightweight Linux distribution for your old PC or a reliable desktop version for employees in your organization, you may be overwhelmed with the number of choices for finding one for your use.

How to list the installed Packages on Ubuntu

It is only natural to start installing more and more software on your Ubuntu PC once you start using it. Similarly, it is also natural to lose track of the different packages that you have installed on your system. Eventually, you may be overwhelmed with the number of packages in your system and with the ones you hardly used.

How to configure the Ubuntu Firewall (UFW)

A properly configured firewall is a crucial part of establishing preliminary system security. Keeping this in mind, here we will go over how to configure the firewall on your Ubuntu PC.

How to install and use Zoom on Ubuntu

If you work from home or hold meetings with other people remotely, then you have probably heard of Zoom. It is one of the popular video conferencing software app available today.

How to Restart Networking on Ubuntu

Sometimes resetting your Ubuntu network is required to apply some network configurations like changing your IP from Automatic DHCP to static one. Restarting the network is not a big deal, but should be done carefully.

How to install Chrome and Chromium Browser on Pop!_OS

By default, Pop!_OS comes with Mozilla Firefox Browser installed to help you browse the internet. It is a reliable web browser covering almost all the features and functionalities you need. However, working with Firefox is noticeably different compared to Google Chrome, especially from the speed point of view. Google Chrome is a tad quicker than Firefox.

MUST READ

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.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

How to clone hard disk on Linux using Clonezilla

Disk cloning refers to the process of copying data from one disk to another, thus creating a one-to-one copy of the drive. Technically, this process is possible using the copy-and-paste method.

Ubuntu 19.10 (Eoan Ermine) Beta Installation and Overview

It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.

10+ Best Python IDEs for Linux

Python programming language is applied in so many areas of computer technology, i.e., Scripting, GUI development, Website development, Artificial Intelligence (AI), Machine Learning, Data Science, Computer Networking, and Network Automation, and Cyber Security.

How to dual-boot Ubuntu and Fedora on your PC

Every Linux distribution has its capabilities and preferences as per the user requirements. That brings forth the need to run different distros on one laptop. For example, a CyberSecurity enthusiast might prefer to use Ubuntu for development and Kali Linux for penetration testing.