Linux

Format an USB pen drive on Linux

Do you want to format an USB pen drive on Linux, but you do not know how to do it? GParted is the solution.
Format an USB pen drive on Linux is highly recommended because it offers several benefits:

  • it will erase all previous data – important if you stored sensitive data (that you don’t longer need);
  • it allow you to choose a file system that better suit your need;
  • it can reduce the file fragmentation on the disk and therefore improve the performances of the pen drive (this requires to copy the files elsewhere first and copy them back after the format).

Format an USB pen drive on Linux

In order to format an USB pen drive on Linux, we need a program called GParted. If it is not already installed on your system you need to install it through your distribution package manager; for example on Debian, Ubuntu and derivatives, open the terminal and type:
sudo apt-get install gparted
Once GParted is installed open it from your distribution application menu – you will probably be asked to enter the password for system administration.

After a few seconds (necessary to analyze all disks connected to the system) GParted will open up and you can select the USB pen drive from the top-right menu.


GParted will show the partition table of the selected USB pen drive. Right-click the partition e select “Unmount”.

Right-click again, select “Format to” and choose the file system you like.

Than confirm by clicking “Apply” and wait for the end of the operation.

And now you have an USB pen drive ready for reuse.

Marco Di Fresco