Format usb drive feature image

How to Format USB drive in Linux Using Terminal?

Formatting USB drive is one of the easiest tasks in Windows or other GUI operating systems, even you can format the USB drive in Linux using GUI. Most of the Linux distros comes with the Disk Utility, or you can download and install any third-party tool to format USB drive. But this article will show you to Format USB drive in Linux using Terminal. This will be helpful when formatting any drive in the Core Linux server.

Many file systems are in use, but based on the usage the following three are the most popular file systems used in USB drives.

  • FAT32
  • NTFS
  • exFAT

Format USB drive in Linux Using Terminal:

Connect the USB drive to your Linux machine, and make sure you know the name and size of the drive.

Open Linux Terminal by pressing Ctrl +Alt + T and type the following command and hit enter.

df

This command will list out all mounted partitions and relevant information like Used space, available space, used space percentage, path, and name.

First, locate your USB drive and you can find the drive by identifying the name of the USB drive or the size. If you are not sure just remove and type the df command and reconnect and enter the command once again. In my case /dev/sdb1 is my USB drive.

Once you identified your USB drive note down the file system path and first unmount the drive. Type the following command to unmount the drive.

Sudo umount /dev/sdb1
Format USB drive in Linux

Type the sudo password and hit enter, this command will unmount the USB drive, After unmounting, use the following commands to format the USB drive with the preferred file system.

To format a USB drive with FAT32 file system, use:

sudo mkfs.vfat /dev/sdb1
  • To format a USB drive using the NTFS file system run:
sudo mkfs.ntfs /dev/sdb1
  • To format a USB drive in accordance with the exFAT file system use:
sudo mkfs.exfat /dev/sdb1

After formatting use this command to verify the drive, sudo fsck /dev/sdb1 after a successful formatting you’ll receive a successful message.

Read Also:

How to Format USB flash drive using PowerShell?

How to uninstall Program using Terminal in Windows 11/10?

How to set automatic suspend timing using Terminal in Ubuntu Linux?

How to Unblock USB using registry in Windows 11/10?

Easy Method: Create Windows 11 to Go USB Drive

Leave a Comment

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.

Scroll to Top