Skip to content
Blog Formatting a USB memory stick (pendrive) in Ubuntu Linux

Formatting a USB memory stick (pendrive) in Ubuntu Linux

When you format a hard drive or storage unit, you have different file systems from which we can use, for example, vfat and ntfs for Windows, and swap, ext2 and ext3 for Linux systems. Here, i explain how to format a USB drive using vfat. The reason for using this file system is that it is authorized to work in Windows and Linux.

IMPORTANT – The first thing to consider:

1. Remember to be logged in as root user to carry out the formatting, otherwise must use the sudo command to activate access. For my part I’ll use the sudo command in this tutorial for easy understanding by novice users.

$ fdisk -l

It will show all your harddisk partions and usb partitions and their device name.
2. The unit must be dismantled. In most of the distributions can be done by clicking on the secondary drive icon and choose “Unmount the unit.”
3. Must be careful to format the drive correctly, but can cause damage to other units such as hard disk for example.

As a first step-and-only open a terminal window and use the mkfs command with the following syntax:

$ sudo mkfs.vfat /dev/sdxx

Where /dev/sdxx is the path of the USB device to be formatted.

2 thoughts on “Formatting a USB memory stick (pendrive) in Ubuntu Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.